+ if (_imageReslicer==NULL)
+ {
+ _imageReslicer = vtkImageReslice::New();
+ _imageReslicer->SetInput( img );
+ _imageReslicer->SetInformationInput(img);
+ _imageReslicer->SetResliceAxesDirectionCosines(1,0,0, 0,1,0 ,0,0,1);
+ _imageReslicer->SetOutputDimensionality(2);
+ _imageReslicer->SetInterpolationModeToLinear();
+ }
+
+ _imageReslicer->SetResliceAxesOrigin(0,0,z);
+
+ img = _imageReslicer->GetOutput();
+ img->Update();
+ img->UpdateInformation();
+
+ wxVtkBaseView * baseView = _theViewPanel->getWxVtkBaseView();
+
+ if (_thresholdTable==NULL)
+ {
+ //Lookup Table
+ _thresholdTable = vtkLookupTable::New();
+ _thresholdTable->SetNumberOfTableValues(maxTot+1);
+ _thresholdTable->SetTableRange(range);
+ _thresholdTable->SetAlphaRange(0, 1);
+ _thresholdTable->SetValueRange(0, 1);
+ _thresholdTable->SetSaturationRange(0, 0);
+ _thresholdTable->SetRampToLinear( );
+ }
+
+ //Assign a fake color for the upper image, and set the white as transparent
+ int i;
+ for(i = minTot; i <= maxTot; i++)