+ _vtkmprbasedata->GetImageData()->GetScalarRange(range);
+ delta = range[1]-range[0];
+
+
+ _ctFunVectorPoint.clear();
+ _ctFunVectorPoint.push_back( range[0] + delta*0/4 );
+ _ctFunVectorPoint.push_back( range[0] + delta*1/4 );
+ _ctFunVectorPoint.push_back( range[0] + delta*2/4 );
+ _ctFunVectorPoint.push_back( range[0] + delta*3/4 );
+ _ctFunVectorPoint.push_back( range[0] + delta*4/4 );
+
+ _ctFunVectorRed.clear();
+ _ctFunVectorRed.push_back(0.0);
+ _ctFunVectorRed.push_back(1.0);
+ _ctFunVectorRed.push_back(0.0);
+ _ctFunVectorRed.push_back(0.0);
+ _ctFunVectorRed.push_back(0.0);
+
+ _ctFunVectorGreen.clear();
+ _ctFunVectorGreen.push_back(0.0);
+ _ctFunVectorGreen.push_back(0.0);
+ _ctFunVectorGreen.push_back(0.0);
+ _ctFunVectorGreen.push_back(1.0);
+ _ctFunVectorGreen.push_back(0.2);
+
+ _ctFunVectorBlue.clear();
+ _ctFunVectorBlue.push_back(0.0);
+ _ctFunVectorBlue.push_back(0.0);
+ _ctFunVectorBlue.push_back(1.0);
+ _ctFunVectorBlue.push_back(0.0);
+ _ctFunVectorBlue.push_back(0.0);
+
+
+ if(_ctfun==NULL)
+ {
+ _ctfun = vtkColorTransferFunction::New();
+ }
+ _ctfun->RemoveAllPoints();
+
+ int i,size=_ctFunVectorPoint.size();
+ for (i=0;i<size;i++)
+ {
+ _ctfun->AddRGBPoint( _ctFunVectorPoint[i] , _ctFunVectorRed[i],_ctFunVectorGreen[i],_ctFunVectorBlue[i]);
+
+ }
+ /*
+ _ctfun->AddRGBPoint( 100 ,0 ,0,0);
+ _ctfun->AddRGBPoint( 200 ,1 ,0,0);
+ _ctfun->AddRGBPoint( 300 ,0 ,1,0);
+ _ctfun->AddRGBPoint( 400 ,0 ,0,1);
+ */
+ // void *p=this; // JPRx
+
+ // Create the first of the three planes. The filter vtkImageMapToColors
+ // maps the data through the corresponding lookup table created above. The
+ // vtkImageActor is a type of vtkProp and conveniently displays an image on
+ // a single quadrilateral plane. It does this using texture mapping and as
+ // a result is quite fast. (Note: the input image has to be unsigned char
+ // values, which the vtkImageMapToColors produces.) Note also that by
+ // specifying the DisplayExtent, the pipeline requests data of this extent
+ // and the vtkImageMapToColors only processes a slice of data.
+
+ if(_saggitalColors==NULL){
+ _saggitalColors = vtkImageMapToColors::New();
+ }
+ _saggitalColors->RemoveAllInputs();
+ _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
+
+ // _saggitalColors->SetLookupTable(_bwLut);
+
+ _saggitalColors->SetLookupTable(_ctfun);