void cpPluginsWidgets::SeedWidget::
_GenerateData( )
{
- auto image = this->GetInputData( "ReferenceImage" )->GetITK< itk::DataObject >( );
+ auto image = this->GetInputData< itk::DataObject >( "ReferenceImage" );
cpPlugins_Image_Demangle_Dim ( _GD0, image, 2 );
else cpPlugins_Image_Demangle_Dim( _GD0, image, 3 );
else this->_Error( "No valid input image." );
void cpPluginsWidgets::SeedWidget::
_GD0( _TImage* image )
{
- typedef
+
+ /*
+ typedef
cpExtensions::DataStructures::ImageIndexesContainer< _TImage::ImageDimension >
_TContainer;
- typedef cpExtensions::Interaction::ImageInteractorStyle _S;
+ typedef cpExtensions::Interaction::ImageInteractorStyle _S;
- if( image != NULL )
- {
+ if( image != NULL )
+ {
auto container = this->_CreateITK< _TContainer >( );
double aux_pnt[ 3 ];
unsigned int dim = ( _TImage::ImageDimension < 3 )? _TImage::ImageDimension: 3;
// MPR
if( this->m_MPRViewer != NULL )
{
- for( unsigned int i = 0; i < 4; ++i )
- {
- _S* s =
- dynamic_cast< _S* >(
- this->m_MPRViewer->GetInteractor( i )->GetInteractorStyle( )
- );
- if( s != NULL )
- {
- if( this->m_Configured )
- {
- for( unsigned int i = 0; i < s->GetNumberOfSeeds( ); ++i )
- {
- s->GetSeedAsPoint( i, aux_pnt );
- typename _TImage::PointType seed;
- for( unsigned int d = 0; d < dim; ++d )
- seed[ d ] = aux_pnt[ d ];
- typename _TImage::IndexType idx;
- if( image->TransformPhysicalPointToIndex( seed, idx ) )
- container->Get( ).push_back( idx );
-
- } // rof
- }
- else
- s->SeedWidgetOn( );
-
- } // fi
-
- } // rof
+ for( unsigned int i = 0; i < 4; ++i )
+ {
+ _S* s =
+ dynamic_cast< _S* >(
+ this->m_MPRViewer->GetInteractor( i )->GetInteractorStyle( )
+ );
+ if( s != NULL )
+ {
+ if( this->m_Configured )
+ {
+ for( unsigned int i = 0; i < s->GetNumberOfSeeds( ); ++i )
+ {
+ s->GetSeedAsPoint( i, aux_pnt );
+ typename _TImage::PointType seed;
+ for( unsigned int d = 0; d < dim; ++d )
+ seed[ d ] = aux_pnt[ d ];
+ typename _TImage::IndexType idx;
+ if( image->TransformPhysicalPointToIndex( seed, idx ) )
+ container->Get( ).push_back( idx );
+
+ } // rof
+ }
+ else
+ s->SeedWidgetOn( );
+
+ } // fi
+
+ } // rof
} // fi
_S* s = dynamic_cast< _S* >( this->m_SingleInteractor );
if( s != NULL )
{
- if( this->m_Configured )
- {
- for( unsigned int i = 0; i < s->GetNumberOfSeeds( ); ++i )
- {
- s->GetSeedAsPoint( i, aux_pnt );
- typename _TImage::PointType seed;
- for( unsigned int d = 0; d < dim; ++d )
- seed[ d ] = aux_pnt[ d ];
- typename _TImage::IndexType idx;
- if( image->TransformPhysicalPointToIndex( seed, idx ) )
- container->Get( ).push_back( idx );
-
- } // rof
- }
- else
- s->SeedWidgetOn( );
+ if( this->m_Configured )
+ {
+ for( unsigned int i = 0; i < s->GetNumberOfSeeds( ); ++i )
+ {
+ s->GetSeedAsPoint( i, aux_pnt );
+ typename _TImage::PointType seed;
+ for( unsigned int d = 0; d < dim; ++d )
+ seed[ d ] = aux_pnt[ d ];
+ typename _TImage::IndexType idx;
+ if( image->TransformPhysicalPointToIndex( seed, idx ) )
+ container->Get( ).push_back( idx );
+
+ } // rof
+ }
+ else
+ s->SeedWidgetOn( );
} // fi
this->m_Configured = true;
container->SetReferenceImage( image );
this->GetOutputData( "Output" )->SetITK( container );
- }
- else
+ }
+ else
this->_Error( "Input image dimension not supported." );
+ */
}
// eof - $RCSfile$