[vtkusers] vtkImageClip question

Tony Pan tpan at bmi.osu.edu
Thu Sep 18 13:49:38 EDT 2003


Hi,
I am reading the Visible Human cryosection data, which are RGB 24 bit
non-interleaved, 2048x1216.   I am using vtkImageReader, specifying 1
component, 3x height.  Once I get the image, I use 3 vtkImageClip
instances to clip out the R, G, and B images.  For each of the
vtkImageClip, I use a vtkImageChangeInformation to translate the extent
back to have 0, 0, 0 starting point.  Finally, I use
vtkImageAppendComponents to combine the images back.  (Found this
solution in a previous post in the forum)
 
The problem I am running into is that vtkImageAppendComponents complains
that the update extents are not inside the whole extents.  e.g. extent =
(0, 2048, 0, 3647, 0, 0) and wholeextent = (0, 2048, 0, 1215, 0, 0)
vtkImageClip changed only the whole extent, and appendcomponent is
calling update on the update extent.  I am trying NOT to replicate data,
so I had ClipData set to off for vtkImageClip, but this also leaves the
output extents at 3x height.
 
Interesting thing is if I read the image in as a volume (3 slices), I
can use this process without any problems.  But I am trying to avoid
doing this because my next step is to read in a stack of images instead
of just 1 image.
 
Any help is appreciated.
 
Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030918/59d5b082/attachment.htm>


More information about the vtkusers mailing list