[vtkusers] Question on vtkDataArray::GetRange() and doubles...

Charles Boivin Charles.Boivin at rwdiwest.com
Tue Aug 24 17:24:27 EDT 2004


Hello all!

Still playing with my own data reader, and I have yet another question
for you gurus. I have tried to see if this had been discussed before on
this mailing list, but could not find a relevant question when reading
through search results.

I want to know what the range of the values that I have just read is.
To do this, I use something like:

pArray = pPointData->GetArray(iArrayNumber);

(where pPointData is vtkPolyData::GetOutput()->GetPointData() ... )

and then using:

float afRange[2];
pArray->GetRange(afRange, iComponentNumber);

I can get the range in afRange[]. This works fine. 

My question has to do with the different data types... The array that I
have stored in vtkPolyData is actually a double array (vtkDoubleArray).
Yet, there does not seem to be a way to get the range returned as
doubles. Am I missing something, or is the loss of accuracy not too
important there when it comes to the range of scalar values?

Thank you in advance for your answers...

Charles Boivin



More information about the vtkusers mailing list