[vtkusers] VTKStructuredGrid.SetExtent Problem

Chris Hood Chris.Hood at noaa.gov
Tue Jan 20 16:44:29 EST 2004


I'm trying to have a section of a structured grid to be used by multiple 
actors (structured grid filter, contour and streamlines). Using SetExtent I 
have two problems:

1) When I try to set either of the first two dimensions to anything but all 
the points, the result looks like a oragomy flower rather than a section of 
the original image.

2) When I set the third dimension, it always starts at zero rather than 
where I tell it. If I tell it ... 0, 20), it'll show 0 -20, but if I tell 
it ... 20, 40), it'll still show 0-20.

Does anyone know what the problem is?

I'm programming in Java on WinXP using VTK 4.2.

Here's a piece of the code:

vtkStructuredGrid modelData = new vtkStructuredGrid();
vtkExtractGrid extractGrid = new vtkExtractGrid();

dataGridDimensions = modelData.GetDimensions();
modelData.SetExtent(0, radMax, 0,  dataGridDimensions[1]-1, phiMin, phiMax);

extractGrid.SetInput(modelData);
int midPoint = dataGridDimensions[1]/2;
extractGrid.SetVOI(0, dataGridDimensions[0]-1, midPoint, midPoint, 0, 
dataGridDimensions[2]-1);
renPanel.GetRenderer().AddActor(actorGrid);


____________________________________
Chris Hood
Graduate Student Research Assistant
University of Colorado, Boulder
Space Environment Center - NOAA 




More information about the vtkusers mailing list