LayerImageBase::LayerImageBase()
{
_actorPresent = false;
- _X = 0;
- _Y = 0;
- _Z = 0;
+ _X = -1;
+ _Y = -1;
+ _Z = -1;
+ _opacity = 1;
_thresholdTable = NULL;
_thresholdMapper = NULL;
_scalarbarActor = NULL;
SetDimensionBase(dimBase);
imagebase->GetSpacing(spcBase);
SetSpcBase(spcBase);
- SetX( dimBase[0]*spcBase[0]/2 );
- SetY( dimBase[1]*spcBase[1]/2 );
- SetZ( dimBase[2]*spcBase[2]/2 );
+
+ if ((_X<0) || (_X>dimBase[0])) { SetX( dimBase[0]/2 ); }
+ if ((_Y<0) || (_Y>dimBase[1])) { SetY( dimBase[1]/2 ); }
+ if ((_Z<0) || (_Z>dimBase[2])) { SetZ( dimBase[2]/2 ); }
+
+
} // if imagebase
} // if wxvtkbaseview
_image->GetScalarRange( _range );
double y=GetY();
double z=GetZ();
-
x = x*_spcBase[0];
y = y*_spcBase[1];
z = z*_spcBase[2];
-
CleanXYZ(x,y,z);
vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera();
} else {
_scalarbarActor->SetDisplayPosition(0,0);
}
+ _scalarbarActor->SetHeight(0.4); //default 0.8
+ _scalarbarActor->SetWidth(0.08); //default 0.17
- _thresholdActor->SetOpacity( 0 );
+ _thresholdActor->SetOpacity( 1 );
_thresholdActor->InterpolateOn( );
if (directionViewer==0)
_thresholdMapper->SetInput( img );
_thresholdMapper->SetLookupTable( _thresholdTable );
_thresholdActor->SetInput( _thresholdMapper->GetOutput() );
-
+ _thresholdActor->SetOpacity(_opacity);
+
_scalarbarActor->SetLookupTable( _thresholdTable );
// _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
_scalarbarActor->SetTitle("Value");
{
_thresholdActor->SetOpacity(opacity/100.0);
}
+// EED 2017-12-17
+ _opacity = (double)opacity/100.0;
}
//----------------------------------------------------------------------------
_range[1]=max;
}
+vtkScalarsToColors* LayerImageBase::GetLookupTable()
+{
+ return _thresholdTable;
+}
+
+
// EOF