// -------------------------------------------------------------------------
class vtkAlgorithmOutput;
class vtkImageData;
+class vtkLookupTable;
// -------------------------------------------------------------------------
namespace cpExtensions
public:
vtkTypeMacro( ImageSliceActors, vtkPropCollection );
- enum LUTType
- {
- LUTType_None = 0,
- LUTType_WindowLevel,
- LUTType_Colors
- };
+ vtkGetMacro( MinWindow, double );
+ vtkGetMacro( MaxWindow, double );
+ vtkGetMacro( MinLevel, double );
+ vtkGetMacro( MaxLevel, double );
public:
// Creation
static ImageSliceActors* New( );
- void AddInputConnection(
- vtkAlgorithmOutput* aout,
- int axis = 2,
- LUTType lut = Self::LUTType_None
- );
- void AddInputData(
- vtkImageData* data,
- int axis = 2,
- LUTType lut = Self::LUTType_None );
+ void AddInputConnection( vtkAlgorithmOutput* aout, int axis = 2 );
+ void AddInputData( vtkImageData* data, int axis = 2 );
void Clear( );
void AssociateSlice( Self* other );
vtkImageMapToColors* GetImageMap( unsigned int id );
const vtkImageMapToColors* GetImageMap( unsigned int id ) const;
- double GetWindow( unsigned int id ) const;
- double GetLevel( unsigned int id ) const;
- void SetWindow( unsigned int id, double w );
- void SetLevel( unsigned int id, double l );
- void SetWindowLevel( unsigned int id, double w, double l );
- void ResetWindowLevel( unsigned int id );
+ double GetWindow( ) const;
+ double GetLevel( ) const;
+ void SetWindow( double w );
+ void SetLevel( double l );
+ void SetWindowLevel( double w, double l );
+ void ResetWindowLevel( );
+
+ void SetLookupTable( unsigned int id, vtkLookupTable* lut );
+ void SetLookupTableAsColor(
+ unsigned int id, double r, double g, double b
+ );
int GetAxis( ) const;
int GetSliceNumber( ) const;
ImageSliceActors( );
virtual ~ImageSliceActors( );
- void _ConfigureNewLUT( vtkImageData* data, LUTType lut_t );
+ void _ConfigureNewLUT( vtkImageData* data );
void _ConfigureNewInput( int axis );
// Events
std::vector< vtkSmartPointer< vtkImageActor > > ImageActors;
bool Interpolate;
+ // Window-Level values
+ double MinWindow, MaxWindow;
+ double MinLevel, MaxLevel;
+
// Other associated slices
std::vector< vtkSmartPointer< Self > > AssociatedSlices;
TCursorCommand SlicesCommand;
vtkSmartPointer< vtkPolyDataMapper > CursorMapper;
vtkSmartPointer< vtkActor > CursorActor;
vtkSmartPointer< vtkPlane > PlaneFunction;
- vtkSmartPointer< vtkPolyData > PlaneSource;
+ vtkSmartPointer< vtkPolyData > Plane;
vtkSmartPointer< vtkPolyDataMapper > PlaneMapper;
char TextBuffer[ 1024 ];
vtkSmartPointer< vtkTextActor > TextActor;