[vtkusers] VOI Extraction

Brian Rowe briprowe at yahoo.com
Fri Apr 23 17:15:10 EDT 2004


On Apr 22, 2004, at 8:51 AM, Amy Henderson wrote:

> Hi Brian,
>
> The parameters you pass to SetDataVOI should be the minimum and 
> maximum pixel value in each dimension, not the minimum and an offset. 
> The example you listed would then be:
> reader->SetDataVOI(x_start, x_end, y_start, y_end, z_start, z_end);
> where: x_start == 568, x_end == 1292,
>          y_start == 258, y_end == 967,
>          z_start == 1141, z_end == 1159
>
> - Amy
>

ok, I tried that and the attatchment is the result.  It's quite similar 
to my previous results.

Here is the code that generated that (the ImageReader part only).

         self.reader = vtkImageReader()
         self.reader.SetDataScalarTypeToUnsignedChar()
         self.reader.SetFilePrefix(prefix)
         self.reader.SetFilePattern(pattern)
         self.reader.SetNumberOfScalarComponents(3)
         self.reader.SetFileNameSliceOffset(1)

         self.reader.SetDataExtent(0, 2048-1,
                                   0, 1216-1,
                                   zrange[0], zrange[1])
         self.reader.FileLowerLeftOff()

         self.reader.SetDataVOI(xrange[0], xrange[1],
                                yrange[0], yrange[1],
                                zrange[0], zrange[1])

Any thoughts would be appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sshot1.png
Type: image/png
Size: 70383 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040423/44e821c0/attachment.png>
-------------- next part --------------

--
1.79 x 10^12 furlongs per fortnight -- it's not just a good idea, it's 
the law!


More information about the vtkusers mailing list