[vtkusers] Bug in vtkExtractVOI
Charl P. Botha
c.p.botha at its.tudelft.nl
Wed Apr 23 10:57:07 EDT 2003
On Wed, 2003-04-23 at 16:57, bryan cole wrote:
> Although (previously) vtkExtractVOI shifted the vtkImageData Origin
> according to the 0,0,0th corner of the extracted sub-volume, the
> sub-volume retained the correct position with respect to the parent
> volume. I.e. the absolute positions of all data-points are/were
> correctly maintained.
> > I would like to change line 204 to:
> > outOrigin[i] = origin[i]
> > along with a fat comment explaining the reasoning behind that.
> > Thoughts?
> I think this breaks the VTK data-model (and my application!). In VTK
> every data-point has a position in 3D space. For unstructured data,
> these poisitions defined explicitly for each point. For structured
> points / vtkImageData, the point positions are implicitly given by the
> dataset Origin and Spacing. Thus the Origin of a vtkImageData dataset
> is, by definition, the position of the 0,0,0th point. (N.B. the Origin
> is not defined for unstructured dataset types)
Maybe I looked to quickly. One could keep the origin where it is, and
make sure the extent takes into account the extraction, or "move" the
origin so that extracted points are still at their correct positions.
It then seems that the previous "working" version of vtkExtractVOI did
the latter which is obviously also good.
Could you perhaps post your patch?
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers