Commit 2b24a785 authored by David Gobbi's avatar David Gobbi

ENH: check order of valid_range and reverse if incorrect

parent 1970d3b6
......@@ -121,7 +121,7 @@ private:
};
//--------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkMINCImageAttributes, "1.6");
vtkCxxRevisionMacro(vtkMINCImageAttributes, "1.7");
vtkStandardNewMacro(vtkMINCImageAttributes);
vtkCxxSetObjectMacro(vtkMINCImageAttributes,ImageMin,vtkDoubleArray);
......@@ -1393,6 +1393,12 @@ void vtkMINCImageAttributes::FindValidRange(double range[2])
{
range[0] = rangearray->GetValue(0);
range[1] = rangearray->GetValue(1);
if (range[0] > range[1])
{
double tmpval = range[0];
range[0] = range[1];
range[1] = tmpval;
}
if (this->DataType == VTK_FLOAT)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment