[vtkusers] Re: constructing volume data from image slices

Nick Hu nhu at sten.sunnybrook.utoronto.ca
Tue Jun 29 11:12:46 EDT 2004


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 appendaxis
flag to 2; when I viewed it with vtkImageViewer, images were appended side
by 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. You
will have to set>the AppendAxis to 2 for appending slices in XY plane to Z
axis.>Nick> Hi all,>> I'm trying to construct volume data from various
images (read separately).I tried to add images as they are read into a
single volume usingvtkImageAppend.AddInput(), assuming that GetOutput()
member ofvtkImageAppend would return a volume data.  But GetOutput is not
returning avolume.  Can anyone tell me whether my approach is correct and
suggest anyalternatives?>> I appreciate your help.>> Thanks,> Madhu.
>




More information about the vtkusers mailing list