void cpExtensions::QT::ImageWidget::
SetScalarRange( double r[ 2 ] )
{
+ auto actor = this->m_ImageViewerActors->GetWindowLevelImageActor( );
+ if( actor != NULL )
+ {
+ actor->ConfigureWindowLevel( r[ 0 ], r[ 1 ] );
+ this->Render( );
+
+ } // fi
}
// -------------------------------------------------------------------------
void cpExtensions::QT::ImageWidget::
SetWindowLevel( double wl[ 2 ] )
{
+ auto actor = this->m_ImageViewerActors->GetWindowLevelImageActor( );
+ if( actor != NULL )
+ {
+ actor->SetWindowLevel( wl[ 0 ], wl[ 1 ] );
+ this->Render( );
+
+ } // fi
}
// -------------------------------------------------------------------------
void cpExtensions::QT::ImageWidget::
SetImageInterpolation( unsigned char i )
{
+ auto actor = this->m_ImageViewerActors->GetWindowLevelImageActor( );
+ if( actor != NULL )
+ {
+ int int_type = 0;
+ switch( i )
+ {
+ case 'L': int_type = VTK_LINEAR_INTERPOLATION; break;
+ case 'C': int_type = VTK_CUBIC_INTERPOLATION; break;
+ default : int_type = VTK_NEAREST_INTERPOLATION; break;
+ } // hctiws
+ actor->GetProperty( )->SetInterpolationType( int_type );
+ this->Render( );
+
+ } // fi
}
#endif // cpExtensions_QT4