[vtk-developers] Why is GetRange double* even for non double arrays?

David Gobbi david.gobbi at gmail.com
Mon May 17 09:25:09 EDT 2010


On Mon, May 17, 2010 at 7:17 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
>
> vtkSmartPointer<vtkIntArray> ids =
>    vtkIntArray::SafeDownCast(polydata->GetPointData()->GetArray("ids"));
>
> shouldn't one be able to get the range like this:
>
> int range[2];
> ids->GetRange(range);

Don't forget the other signature, which cannot you cannot override
with a different type:

double *GetRange();

It's reasonable to provide a method such as the one that you ask for,
but only if the method name is changed.  So vtkIntArray would have the
following methods added:

void GetValueRange(int range[2]);
double *GetValueRange();

Ditto for the other arrays.

    David



More information about the vtk-developers mailing list