Unable to create a HSV LUT with just 1 colour
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Unable to create a HSV LUT with just 1 colour (this is useful when colouring discrete scalars). vtkLookupTable::SetNumberOfColors() prevents this but there is no lower limit using vtkLookupTable::SetNumberOfTableValues().
vtkLookupTable.cxx at about line 137
Replace
hinc = (this->HueRange[1] - this->HueRange[0])/maxIndex;
sinc = (this->SaturationRange[1] - this->SaturationRange[0])/maxIndex;
vinc = (this->ValueRange[1] - this->ValueRange[0])/maxIndex;
ainc = (this->AlphaRange[1] - this->AlphaRange[0])/maxIndex;
By if ( maxIndex ) { hinc = (this->HueRange[1] - this->HueRange[0])/maxIndex; sinc = (this->SaturationRange[1] - this->SaturationRange[0])/maxIndex; vinc = (this->ValueRange[1] - this->ValueRange[0])/maxIndex; ainc = (this->AlphaRange[1] - this->AlphaRange[0])/maxIndex; } else hinc = sinc = vinc = ainc = 0.0;
or something similar.