# Volume rendering of an image stack in tiff file

**URL:** <https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297>\
**Category:** Support\
**Created:** [June 30, 2020, 1:13pm UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297 "2020-06-30T13:13:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 30, 2020, 1:13pm UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/1 "2020-06-30T13:13:22Z")

</div>

Hello Everyone,  
I have loaded data from a tif file (please check the snapshot for reference)

 ![Untitled](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/7/d7093eee9817969247b9d589150547e914950734.jpeg)

I have enabled depth peeling, clicked `Fit to volume`, varied `shift` and tried different presets. But I am not able to visualize the 3D volume in `Volume rendering` module.

Could someone offer advice on the other options that I could try for visualizing the volume?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 30, 2020, 3:19pm UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/2 "2020-06-30T15:19:33Z")

</div>

You probably need to use this: [https://www.slicer.org/wiki/Documentation/4.10/Modules/VectorToScalarVolume](https://www.slicer.org/wiki/Documentation/4.10/Modules/VectorToScalarVolume)

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [June 30, 2020, 6:04pm UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/3 "2020-06-30T18:04:51Z")

</div>

Hi @pieper

I tried with VectorToScalarVolume module, after loading the [input tiff file](https://drive.google.com/file/d/1fIH3nQYKyoAaeB1rE3yTFoQdXDf0z6RR/view?usp=sharing) as `Volume`.

But I am not able to select the loaded volume as `Input Vector Volume` in the `Conversion settings` tab of VectortoScalarVolume module. I think it’s already a scalar volume. Could you please check the input?

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 30, 2020, 6:18pm UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/4 "2020-06-30T18:18:55Z")

</div>

> [@Deepa](#):
>
> But I am not able to select the loaded volume as `Input Vector Volume` in the `Conversion settings` tab of VectortoScalarVolume module. I think it’s already a scalar volume. Could you please check the input?

I believe TIFF stacks are imported as scalar volume (unlike JPG, BMP and PNG). So I don’t think VectorToScalar will help you there.

What rendering mode are you using? Does switching to CPU rendering help?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 30, 2020, 6:27pm UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/5 "2020-06-30T18:27:57Z")

</div>

I’ve checked the data set and it is a single-component image (so Vector to scalar conversion is not necessary), but the image is quite unusual, as it has a very uneven intensity distribution (meaningful values are between 60000-65000) and background is bright.

To visualize this volume with volume rendering, I would first normalize the intensity range to let’s say 0-5000 using Simple Filters module RescaleIntensityImageFilter:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/b/4b9d8d9223fbb93dc059ff383a6df1ce49010ffe.png)

Then choose a volume rendering preset where bright voxels are transparent, such as CT-Air preset, and adjust the Shift slider until you see what you need:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/f/4f63c9a8ce95ce7461086eaab4427c45402a384c.jpeg)

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [July 1, 2020, 3:06am UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/6 "2020-07-01T03:06:17Z")

</div>

Thanks a lot. This helped, but I also had to switch to CPU rendering as suggested by @muratmaga.

@lassoan and @muratmaga  
I’ve to find the diameters and lengths of the vessels in this volume element. I would like to request for advice on how to proceed with this volume, since the z-spacing is 1mm I am not sure if this will work.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 1, 2020, 3:27am UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/7 "2020-07-01T03:27:44Z")

</div>

Now that you know VOlume rendering works on this dataset, you can try to experiment with GPU rendering. What kind of GPU do you have on this computer, and are drivers up to date?

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [July 1, 2020, 5:40am UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/8 "2020-07-01T05:40:19Z")

</div>

The following is the GPU info of the server. I’m not sure if the drivers are up to date.

±----------------------------------------------------------------------------+  
| NVIDIA-SMI 410.48 Driver Version: 410.48 |  
|-------------------------------±---------------------±---------------------+  
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |  
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |  
|===============================+======================+======================|  
| 0 GeForce GTX 108… Off | 00000000:0A:00.0 Off | N/A |  
| 42% 72C P2 140W / 250W | 303MiB / 11176MiB | 69% Default |  
±------------------------------±---------------------±---------------------+

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 1, 2020, 5:52am UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/9 "2020-07-01T05:52:46Z")

</div>

That GPU should be more than enough to handle that dataset. Are you running this on linux? Might be an issue with the openGL

---

<div class="post-metadata">

**Author:** ![Deepa](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/deepa/32/5634_2.png) [@Deepa](https://discourse.slicer.org/u/Deepa)\
**Post date:** [July 1, 2020, 7:06am UTC](https://discourse.slicer.org/t/volume-rendering-of-an-image-stack-in-tiff-file/12297/10 "2020-07-01T07:06:02Z")

</div>

Yes, I am running this on linux.

> [@muratmaga](#):
>
> Might be an issue with the openGL

Thanks for pointing this out. I will continue using CPU rendering since I don’t have root access o fix these at this point in time 😕
