X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FSphereMeshSource.cxx;h=53e39f0581b9ca1829a530995662d07be191dd37;hb=f69098bd941d8753926760dead2792584eb95f53;hp=78aff5fbebf3ec19d0e5e0db59d279444a9f3c3f;hpb=8db7a40f2ef8530457959a51a4d2a7f012d0b7a3;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx b/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx index 78aff5f..53e39f0 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx @@ -10,15 +10,16 @@ cpPlugins::BasicFilters::SphereMeshSource:: SphereMeshSource( ) : Superclass( ) { - this->SetNumberOfInputs( 0 ); - this->SetNumberOfOutputs( 1 ); - this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 ); - - double point[ 3 ] = { double( 0 ) }; - this->m_Parameters->ConfigureAsPoint( "Center", 3, point ); - this->m_Parameters->ConfigureAsReal( "Radius", 1 ); - this->m_Parameters->ConfigureAsUint( "PhiResolution", 8 ); - this->m_Parameters->ConfigureAsUint( "ThetaResolution", 8 ); + // TODO: this->_AddInput( "Center" ); + this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" ); + + this->m_Parameters->ConfigureAsReal( "Radius" ); + this->m_Parameters->ConfigureAsUint( "PhiResolution" ); + this->m_Parameters->ConfigureAsUint( "ThetaResolution" ); + + this->m_Parameters->SetReal( "Radius", 1 ); + this->m_Parameters->SetUint( "PhiResolution", 8 ); + this->m_Parameters->SetUint( "ThetaResolution", 8 ); } // ------------------------------------------------------------------------- @@ -31,9 +32,12 @@ cpPlugins::BasicFilters::SphereMeshSource:: std::string cpPlugins::BasicFilters::SphereMeshSource:: _GenerateData( ) { - itk::Point< double, 3 > center = - this->m_Parameters->GetPoint< itk::Point< double, 3 > >( "Center", 3 ); - // TODO: center.Fill( double( 0 ) ); // TODO + itk::Point< double, 3 > center; + center.Fill( double( 0 ) ); + /* TODO + itk::Point< double, 3 > center = + this->m_Parameters->GetPoint< itk::Point< double, 3 > >( "Center", 3 ); + */ double radius = this->m_Parameters->GetReal( "Radius" ); unsigned int phi = this->m_Parameters->GetUint( "PhiResolution" ); unsigned int theta = this->m_Parameters->GetUint( "ThetaResolution" ); @@ -46,8 +50,7 @@ _GenerateData( ) src->Update( ); // Execute filter - cpPlugins::Interface::Mesh* out = - this->GetOutput< cpPlugins::Interface::Mesh >( 0 ); + auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" ); out->SetVTK( src->GetOutput( ) ); return( "" ); }