else if( title == "Z" )
this->Actors->SetSlice( 2, int( rep->GetValue( ) ) );
else if( title == "Window" )
- this->Actors->SetWindow( rep->GetValue( ) );
+ this->Actors->SetWindow( 0, rep->GetValue( ) );
else if( title == "Level" )
- this->Actors->SetLevel( rep->GetValue( ) );
+ this->Actors->SetLevel( 0, rep->GetValue( ) );
}
SliderCallback( )
: vtkCommand( )
// Actors
vtkSmartPointer< TMPRActors > mpr_actors =
vtkSmartPointer< TMPRActors >::New( );
- mpr_actors->SetInputData( image );
+ mpr_actors->AddInputData( image );
mpr_actors->PushDataInto( NULL, NULL, NULL, renderer );
// Callbacks
0.500, 0.15, 0.690, 0.15, cb
);
Slider w_slider(
- mpr_actors->GetMinWindow( ),
- mpr_actors->GetMaxWindow( ),
- mpr_actors->GetWindow( ),
+ mpr_actors->GetMinWindow( 0 ),
+ mpr_actors->GetMaxWindow( 0 ),
+ mpr_actors->GetWindow( 0 ),
"Window", interactor,
0.100, 0.05, 0.290, 0.05, cb
);
Slider l_slider(
- mpr_actors->GetMinWindow( ),
- mpr_actors->GetMaxWindow( ),
- mpr_actors->GetWindow( ),
+ mpr_actors->GetMinWindow( 0 ),
+ mpr_actors->GetMaxWindow( 0 ),
+ mpr_actors->GetWindow( 0 ),
"Level", interactor,
0.300, 0.05, 0.490, 0.05, cb
);
this->m_SliceActors = slice_actors;
this->m_MPRActors = mpr_actors;
this->SetModeToNavigation( );
- this->PropPicker->AddPickList( slice_actors->GetImageActor( ) );
+ this->PropPicker->AddPickList( slice_actors->GetImageActor( 0 ) );
this->Modified( );
}
{
if( this->m_MPRActors != NULL )
{
- this->m_MPRActors->ResetWindowLevel( );
+ this->m_MPRActors->ResetWindowLevel( 0 );
this->Interactor->Render( );
this->_RenderAssociateInteractors( );
double w = this->WindowLevelInitial[ 0 ] * ( double( 1 ) + sw );
double l = this->WindowLevelInitial[ 1 ] * ( double( 1 ) + sl );
- double minw = this->m_MPRActors->GetMinWindow( );
- double maxw = this->m_MPRActors->GetMaxWindow( );
- double minl = this->m_MPRActors->GetMinLevel( );
- double maxl = this->m_MPRActors->GetMaxLevel( );
+ double minw = this->m_MPRActors->GetMinWindow( 0 );
+ double maxw = this->m_MPRActors->GetMaxWindow( 0 );
+ double minl = this->m_MPRActors->GetMinLevel( 0 );
+ double maxl = this->m_MPRActors->GetMaxLevel( 0 );
if( w < minw ) w = minw;
if( maxw < w ) w = maxw;
if( l < minl ) l = minl;
if( maxl < l ) l = maxl;
- this->m_MPRActors->SetWindowLevel( w, l );
+ this->m_MPRActors->SetWindow( 0, w );
+ this->m_MPRActors->SetLevel( 0, l );
this->Interactor->Render( );
this->_RenderAssociateInteractors( );
}
{
this->StartState( VTKIS_WINDOW_LEVEL );
- this->WindowLevelInitial[ 0 ] = this->m_MPRActors->GetWindow( );
- this->WindowLevelInitial[ 1 ] = this->m_MPRActors->GetLevel( );
+ this->WindowLevelInitial[ 0 ] = this->m_MPRActors->GetWindow( 0 );
+ this->WindowLevelInitial[ 1 ] = this->m_MPRActors->GetLevel( 0 );
}
else if( this->Mode == Self::DeformationMode )
{
return( new Self( ) );
}
+// -------------------------------------------------------------------------
+cpExtensions::Visualization::
+ImageSliceActors* cpExtensions::Visualization::MPRActors::
+GetSliceActors( const int& i ) const
+{
+ if( i < 3 )
+ return( this->Slices[ 0 ][ i ] );
+ else
+ return( NULL );
+}
+
// -------------------------------------------------------------------------
int cpExtensions::Visualization::MPRActors::
AddInputConnection( vtkAlgorithmOutput* aout )
// Creation
static MPRActors* New( );
- // TODO: ImageSliceActors* GetSliceActors( const int& i ) const;
+ ImageSliceActors* GetSliceActors( const int& i ) const;
int AddInputConnection( vtkAlgorithmOutput* aout );
int AddInputData( vtkImageData* image );
void cpExtensions::Visualization::MPRObjects::
SetImage( vtkImageData* image )
{
- this->m_MPRActors->SetInputData( image );
+ this->m_MPRActors->AddInputData( image );
this->m_MPRActors->PushDataInto(
this->m_Renderers[ 0 ],
this->m_Renderers[ 1 ],