- 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
-
- // Single interactor
- _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( );
-
- } // fi
- this->m_Configured = true;
-
- this->GetOutputData( "Output" )->SetITK( container );
- return( "" );
+ 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 );
+ return( "" );
+ }
+ else
+ return( "Widgets::SeedWidget: Input image dimension not supported." );