]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx
Project cleanup towards version 0.1.0
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / MarchingCubes.cxx
diff --git a/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx b/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx
deleted file mode 100644 (file)
index f05296e..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "MarchingCubes.h"
-#include <cpPlugins/Interface/Image.h>
-#include <cpPlugins/Interface/Mesh.h>
-
-#include <vtkImageData.h>
-#include <vtkMarchingCubes.h>
-#include <vtkMarchingSquares.h>
-
-// -------------------------------------------------------------------------
-cpPlugins::BasicFilters::MarchingCubes::
-MarchingCubes( )
-  : Superclass( )
-{
-  this->_AddInput( "Input" );
-  this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
-
-  this->m_Parameters->ConfigureAsRealList( "Thresholds" );
-}
-
-// -------------------------------------------------------------------------
-cpPlugins::BasicFilters::MarchingCubes::
-~MarchingCubes( )
-{
-}
-
-// -------------------------------------------------------------------------
-std::string cpPlugins::BasicFilters::MarchingCubes::
-_GenerateData( )
-{
-  // Get input
-  auto image = this->GetInputData( "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( "Thresholds" );
-  vtkPolyData* pd = NULL;
-  if( vtk_image->GetDataDimension( ) == 2 )
-  {
-    vtkMarchingSquares* ms = this->_CreateVTK< vtkMarchingSquares >( );
-    ms->SetInputData( vtk_image );
-    for( unsigned int i = 0; i < values.size( ); ++i )
-      ms->SetValue( i, values[ i ] );
-    ms->Update( );
-    pd = ms->GetOutput( );
-  }
-  else if( vtk_image->GetDataDimension( ) == 3 )
-  {
-    vtkMarchingCubes* mc = this->_CreateVTK< vtkMarchingCubes >( );
-    mc->ComputeNormalsOff( );
-    mc->SetInputData( vtk_image );
-    for( unsigned int i = 0; i < values.size( ); ++i )
-      mc->SetValue( i, values[ i ] );
-    mc->Update( );
-    pd = mc->GetOutput( );
-  }
-  else
-    return( "MarchingCubes: Input data does not have a valid dimension." );
-
-  // Execute filter
-  auto out = this->GetOutputData( "Output" );
-  out->SetVTK( pd );
-  return( "" );
-}
-
-// eof - $RCSfile$