# Viewing Voxels Using ITK Widgets

**URL:** <https://forum.allencell.org/t/viewing-voxels-using-itk-widgets/165>\
**Category:** Miscellaneous\
**Created:** [January 27, 2020, 5:50pm UTC](https://forum.allencell.org/t/viewing-voxels-using-itk-widgets/165 "2020-01-27T17:50:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dylanmendonca](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@dylanmendonca](https://forum.allencell.org/u/dylanmendonca)\
**Post date:** [January 27, 2020, 5:50pm UTC](https://forum.allencell.org/t/viewing-voxels-using-itk-widgets/165/1 "2020-01-27T17:50:02Z")

</div>

Hi,

My cell images are distorted in the sense that the aspect ratios are all off. How do I incorporate the voxel size in python?

When I use 3D viewer in ImageJ with the specified size, it interpolates just fine. How could I do this in Python and visualize the results using the `view` function in itkwidgets?

---

<div class="post-metadata">

**Author:** ![jianxu\_chen](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jianxu\_chen](https://forum.allencell.org/u/jianxu_chen)\
**Post date:** [January 29, 2020, 7:44am UTC](https://forum.allencell.org/t/viewing-voxels-using-itk-widgets/165/2 "2020-01-29T07:44:47Z")

</div>

I think this example will be helpful:

> <https://github.com/InsightSoftwareConsortium/itkwidgets/blob/master/examples/ImageWithAnisotropicPixelSpacing.ipynb>

---

<div class="post-metadata">

**Author:** ![dylanmendonca](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@dylanmendonca](https://forum.allencell.org/u/dylanmendonca)\
**Post date:** [January 31, 2020, 5:16pm UTC](https://forum.allencell.org/t/viewing-voxels-using-itk-widgets/165/3 "2020-01-31T17:16:56Z")

</div>

Thanks for that!

I was curious, when using Otsu’s method to threshold 3D cell images, should we perform the Otsu thresholding on the image that has been interpolated along the z slices?

---

<div class="post-metadata">

**Author:** ![jianxu\_chen](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jianxu\_chen](https://forum.allencell.org/u/jianxu_chen)\
**Post date:** [February 12, 2020, 9:20pm UTC](https://forum.allencell.org/t/viewing-voxels-using-itk-widgets/165/4 "2020-02-12T21:20:08Z")

</div>

Not necessarily. The Otsu method can be applied on the anisotropic image, after proper pre-processing, like smoothing. When you interprete or analyze your results, you can decide if you need to interpolate along z or not.
