Generate 3D visualization by Stacking 2D RGB H&E Images

Operating system: Windows 11
Slicer version: 3D Slicer 5.0.3
Expected behavior: N/A
Actual behavior: N/A
Hi, I have 34 H&E (histology) 2-D RGB Images that are in .png file format and I want to stack them to visualize them in 3-D using 3D Slicer. I’ve tried the tutorials for ImageStack, but it automatically turns the stack into grayscale, which is something I don’t want. I’m familiar with Python, but not familiar with the python extension of 3dslicer- is there an example/documentation that I can follow so I can do this? I’ve read previous forum posts about this as well but I do not know where to start. If there’s a way to do it in the app itself (rather than coding in python), that would be even better. Thank you so much!

Did you try unchecking the Grayscale option? It should do what you want, but be aware that not all features of Slicer support color images. Also with just 34 slices you won’t get much 3D detail, but it may be all you need.

image

Thanks for the reply, may I ask where this option is?

Towards the bottom of the ImageStack’s UI

Thank you- I was able to generate a volume, but it obviously wasn’t what I expected. Each RGB 2-D images look like this, and below that is the generated 3-D representation. What would be the best method to reveal the “sides” of the stack so that the entire volume representation can be seen? Currently it is all black and you cannot see any contours of the side, etc. I’m guessing maybe that’s related to the transparency channel (RGBA)? Also, I’m wondering why the top surface image look blurry as well. Could that be related to the 10x downsampling I did to the image? Thank you so much, these questions may sound basic/stupid, but I’m a beginner and I would appreciate all the help.


I was actually able to resolve this by myself, marking two previous replies as a solution, thanks!

Unfortunately, some of the difficulty you are encountering is because this type of data (a few very large histology slices) is a type of volume which is not the application proglem 3D Slicer is designed to address. There have been several efforts to bring histology data into Slicer over the years because Slicer is so good at managing imagery analysis, but it is still a challenge.

It may be a somewhat different application, but I found this Nature paper to have some discussion about image stack preparation, in case it is helpful: https://www.nature.com/articles/s41598-020-69163-z

For histology volumes like yours, there are generally large gaps in the depth direction between slices, so this data would benefit from pre-processing before it can be rendered correctly using a traditional volume rendering application, like what is built into Slicer. In your case, the downsampling to 10X does increase blur. The rendering algorithm will also tend to increase blur because it is compiling the visual effect along the rays between the voxels and the viewpoint. Since histology volumes have large white regions at their boundaries, they require a lot of tweaking to the volume rendering transfer functions to eliminate the black borders unless the imagery is pre-processed before rendering to eliminate the non-tissue areas. Since you have this data in Slicer already, try adjusting the alpha channel of the volume rendering so that voxels of the highest-intensity are completely transparent. This will make a bit of your tissue become transparent along with the borders, but it should be closer to what you are looking for. Good luck!

What downsampling do you mean? Slicer directly displays the image at the actual resolution. There is no resolution limit in the CPU volume renderer. The GPU volume renderer may have hardware limitations for maximum texture but the image can then be cropped to the region of interest or tiling can be enabled by a few lines of Python script.