]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpaPlugins/MinimumSpanningTreeToMesh.cxx
...
[FrontAlgorithms.git] / lib / fpaPlugins / MinimumSpanningTreeToMesh.cxx
index c474429f3ba3e3f8a405819b82191d85ea1aa60d..8596bc5034f3074a633b7b02b8542ab0093eac30 100644 (file)
@@ -37,8 +37,7 @@ _GenerateData( )
   typedef itk::ImageBase< 2 > _2D;
   typedef itk::ImageBase< 3 > _3D;
 
-  auto input =
-    this->GetInputData< cpPlugins::Interface::Image >( "ReferenceImage" );
+  auto input = this->GetInputData( "ReferenceImage" );
   _2D* im2d = input->GetITK< _2D >( );
   _3D* im3d = input->GetITK< _3D >( );
   if( im2d != NULL )
@@ -54,25 +53,27 @@ template< class I >
 std::string fpaPlugins::MinimumSpanningTreeToMesh::
 _GD0( I* image )
 {
+  /* TODO
   typedef typename I::IndexType                                        _V;
   typedef typename I::PointType                                        _P;
   typedef itk::Functor::IndexLexicographicCompare< I::ImageDimension > _VC;
   typedef fpa::Base::MinimumSpanningTree< _V, _VC >                    _MST;
 
   // Get inputs
-  auto mst_wrapper =
-    this->GetInputData< fpaPlugins::MinimumSpanningTree >( "Input" );
+  auto mst_wrapper = this->GetInputData( "Input" );
   _MST* mst = mst_wrapper->GetITK< _MST >( );
   if( mst == NULL )
     return( "fpaPlugins::MinimumSpanningTreeToMesh: Input MST type not supported." );
-  auto seeds =
-    this->GetInputData< cpPlugins::Interface::PointList >( "Seeds" );
+  auto seeds = dynamic_cast< cpPlugins::Interface::PointList* >(
+    this->GetInputData( "Seeds" )
+    );
+  if( seeds == NULL )
+    return( "fpaPlugins::MinimumSpanningTreeToMesh: Not valid seeds." );
   if( seeds->GetNumberOfPoints( ) < 2 )
     return( "fpaPlugins::MinimumSpanningTreeToMesh: Not enough seeds (<2)." );
 
   // Get output
-  auto out =
-    this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" );
+  auto out = this->GetOutputData( "Output" );
   vtkSmartPointer< vtkPolyData > pd = out->GetVTK< vtkPolyData >( );
   if( pd.GetPointer( ) == NULL )
   {
@@ -120,6 +121,8 @@ _GD0( I* image )
   pd->SetLines( array );
 
   return( "" );
+  */
+  return( "Not yet implemented." );
 }
 
 // eof - $RCSfile$