[vtkusers] accessing a subregion of vtkImageData

Glen.Coates at csiro.au Glen.Coates at csiro.au
Wed Feb 12 17:51:25 EST 2003


On Wed, 12 Feb 2003, Steffen Oeltze wrote:

> I'd like to access a subregion of my vtkImageData (512x512x181). So far I have 
> used the vtkExtractVOI-class for that purpose. However, this class creates a 
> copy of the subregion and therefore increases my application's memory demand.
> 
> Is there a way to avoid this by using pointers to the subregion ?

You can only use pointers into the original memory if the subregion you 
intend to select is contiguous in the vtkDataArray that holds the 
pixel/voxel data.

Unless you are trying to extract a series of *whole* XY slices from the 
original volume, you will probably not be able to do this.

-- 
Cheers,
Glen




More information about the vtkusers mailing list