[ITK] Using ImagePlaneWidget to display 3D Images

Imre Goretzki goretzki.imre at gmail.com
Mon Nov 30 06:14:13 EST 2015


Hey guys

I have some trouble displaying a 3D Image (multipaged tif) via VTK. My 
Setup:

grayscale image (520x520x47)
Single slice (1 to 47) is an image (520x520)
the minimum of this 3d image is 865, the maximum 16288

reading via ITK works great, I can even display 2D images using the 
ImageToVTKImageFilter

Now the problem:

I tried to connect the ITK image with VTK to visualize the image. I use 
the ImageToVTKImageFilter to connect ITK with VTK. Displaying 2D images 
(a single slice of the whole image) works, but i dont know how to 
display the 3D volume.

For reference, I tried to change these examples to work with the 
connector type:
http://itk.org/Wiki/ITK/Examples/ImageProcessing/MinimumMaximumImageCalculator 

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/ImagePlaneWidget

Unfortunately, all I get is a empty render window.

Here's my code:
http://pastebin.com/p2YyUirp

If I remove planeWidget->SetInputData(con->GetOutput());
from line 36, line 50 throws errors, so that a single empty window is 
displayed.

I tried working with three image planes, but that did not change that much:
http://pastebin.com/Sz6Etfu4

I get the data, if I'm using the 3 planes, but I hoped, that there will 
be some type of visible shape - compared to MATLAB's imshow for 3D images.

I hope that you can help me.

Regards
Imre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20151130/8099c94d/attachment.html>


More information about the Community mailing list