[vtkusers] Re: constructing volume data from image slices

Madhusudhanan Balasubramanian madhu_lsu at yahoo.com
Wed Jun 30 11:40:36 EDT 2004


Hi Nick,

I was using a vtkTIFFReader instance and I updated both the reader and as well as the vtkImageAppend instances with Update().  It didn't work.  This is what I found: 

When I appeneded the images to the vtkImageAppend instance (with append axis set to 2, for that matter either 0/1), the output dimensions of the vtkImageData instance returned by the GetOutput() procedure was never more than the visible extents; so, I set the whole extents be updated (with UpdateWholeExtent() of vtkImageAppend) and it worked.

Thanks for the discussion and your insight nick.

Madhu.

>Madhu,>Did you Update() the filter before you called GetOutput()? If the output of>vtkImageAppend goes to the display pipeline, it will be updated whenever the>image is rendering. However, if you just want to access the output image>before the rendering, you will have to force the filter to update.>Nick> Hi Nick,>> It tried that and didn't work.  (Intially, I didn't set the appendaxisflag to 2; when I viewed it with vtkImageViewer, images were appended sideby side, so learnt about the append axis and later set it to 2 (z-axis))However, with the appendaxis set to 2, GetOutput() is not returning volume.Thanks for your insight in this problem.>> Madhu.>> >Hi Madhu,>The default AppendAxis of vtkImageAppend is the X axis. Youwill have to set>the AppendAxis to 2 for appending slices in XY plane to Zaxis.>Nick> Hi all,>> I'm trying to construct volume data from variousimages (read separately).I tried to add images as they are read into asingle volume usingvtkImageAppend.AddInput(),
 assuming that GetOutput()member ofvtkImageAppend would return a volume data.  But GetOutput is notreturning avolume.  Can anyone tell me whether my approach is correct andsuggest anyalternatives?>> I appreciate your help.>> Thanks,> Madhu.>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040630/87feb3e2/attachment.htm>


More information about the vtkusers mailing list