[vtkusers] vtkThreshold - Mechanics

Christian Werner christian.werner at rwth-aachen.de
Mon Mar 1 07:54:03 EST 2010


Hi!

I've learned from the Paraview Mailing List how Points and Cells in a 
structured grid are organized. Anyway there are a few things which I do 
not yet understand.

I see from the source of the Threshold plugin that the data to be 
processed is actually obtained in three different ways:

vtkPointData *pd=input->GetPointData(), *outPD=output->GetPointData();
vtkCellData *cd=input->GetCellData(), *outCD=output->GetCellData();

vtkDataArray *inScalars = this->GetInputArrayToProcess(0,inputVector); 
//inputVector is the input information vector


where the latter seems to be the array containing the actual volume 
data. The decision if a cell or point goes through the thresholding 
criteria is made a little later:

keepCell = this->EvaluateComponents( inScalars, ptId );
or
keepCell = this->EvaluateComponents( inScalars, cellId );


This raises two questions:

1) are the ptId and cellId disjunct?
2) if yes, does that mean that the InputArray contains point AND cell 
data? This clearly would require additional memory which is bad if you 
are working with big volumes.

Also I see the use of a DataSet which seems to hold all the cells of the 
volume and each cell seems to contain points ( these must be 8, right? ) 
I guess these points store coordinates? At least there is still another 
array containing only IDs. It seems as if there actually is a bunch of 
redundant information stored when I read a structured grid, or at least 
when executing the Threshold filter.

This would explain why the memory usage skyrockets when manipulating our 
700MB (small version!) volume.

I don't want to complain here about anything, that memory issue is 
another story. More important to me is that I understand the structure 
of this.


Best regards,
Christian



More information about the vtkusers mailing list