X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FMarchingCubes.cxx;h=388b75e293ef3f4f202d4351fcdf8614cde72877;hb=6ffc11d77924d6ab7e94db95d41105982ac73e00;hp=625838c08f6d8d353e139069e713a9b230d98586;hpb=2eaf38cfdcbd2cfb0cc323dad6ded6bbeb436edf;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx b/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx index 625838c..388b75e 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx @@ -12,7 +12,7 @@ MarchingCubes( ) : Superclass( ) { this->_AddInput( "Input" ); - this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" ); + this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" ); this->m_Parameters->ConfigureAsRealList( "Thresholds" ); } @@ -28,16 +28,13 @@ std::string cpPlugins::BasicFilters::MarchingCubes:: _GenerateData( ) { // Get input - cpPlugins::Interface::Image* image = - this->GetInput< cpPlugins::Interface::Image >( "Input" ); - if( image == NULL ) - return( "MarchingCubes: Input data is not a valid image." ); + auto image = this->GetInputData< cpPlugins::Interface::Image >( "Input" ); vtkImageData* vtk_image = image->GetVTK< vtkImageData >( ); if( vtk_image == NULL ) return( "MarchingCubes: Input does not have a valid VTK conversion." ); - std::vector< double > values; - this->m_Parameters->GetRealList( values, "Thresholds" ); + std::vector< double > values = + this->m_Parameters->GetRealList( "Thresholds" ); vtkPolyData* pd = NULL; if( vtk_image->GetDataDimension( ) == 2 ) { @@ -62,8 +59,7 @@ _GenerateData( ) return( "MarchingCubes: Input data does not have a valid dimension." ); // Execute filter - cpPlugins::Interface::Mesh* out = - this->GetOutput< cpPlugins::Interface::Mesh >( "Output" ); + auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" ); out->SetVTK( pd ); return( "" ); }