]> Creatis software - cpPlugins.git/blobdiff - plugins/ImageGradientFilters/FluxImageFilter.cxx
...
[cpPlugins.git] / plugins / ImageGradientFilters / FluxImageFilter.cxx
diff --git a/plugins/ImageGradientFilters/FluxImageFilter.cxx b/plugins/ImageGradientFilters/FluxImageFilter.cxx
deleted file mode 100644 (file)
index 214644e..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <ImageGradientFilters/FluxImageFilter.h>
-#include <cpInstances/Image.h>
-
-#include <cpExtensions/Algorithms/ImageFunctionFilter.h>
-#include <cpExtensions/Algorithms/FluxMedialness.h>
-
-// -------------------------------------------------------------------------
-cpPluginsImageGradientFilters::FluxImageFilter::
-FluxImageFilter( )
-  : Superclass( )
-{
-  typedef cpInstances::Image _TImage;
-  this->_ConfigureInput< _TImage >( "Input", true, false );
-  this->_ConfigureInput< _TImage >( "Mask", false, false );
-  this->_ConfigureOutput< _TImage >( "Output" );
-
-  this->m_Parameters.ConfigureAsReal( "MinRadius", 0 );
-  this->m_Parameters.ConfigureAsReal( "MaxRadius", 1 );
-  this->m_Parameters.ConfigureAsReal( "RadiusStep", 1 );
-  this->m_Parameters.ConfigureAsUint( "RadialSampling", 4 );
-}
-
-// -------------------------------------------------------------------------
-cpPluginsImageGradientFilters::FluxImageFilter::
-~FluxImageFilter( )
-{
-}
-
-// -------------------------------------------------------------------------
-void cpPluginsImageGradientFilters::FluxImageFilter::
-_GenerateData( )
-{
-  auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_Image_CovariantVectorPixels_AllDims_1( o, _GD0 )
-    this->_Error( "Invalid input image." );
-}
-
-// -------------------------------------------------------------------------
-template< class _TImage >
-void cpPluginsImageGradientFilters::FluxImageFilter::
-_GD0( _TImage* image )
-{
-  typedef typename _TImage::PixelType _TGradient;
-  typedef cpExtensions::Algorithms::FluxMedialness< _TImage > _TFunction;
-  typedef typename _TFunction::TOutput _TScalar;
-  typedef itk::Image< _TScalar, _TImage::ImageDimension > _TOutputImage;
-  typedef cpExtensions::Algorithms::ImageFunctionFilter< _TImage, _TOutputImage, _TFunction > _TFilter;
-
-  auto filter = this->_CreateITK< _TFilter >( );
-  auto function = filter->GetFunction( );
-  if( function == NULL )
-  {
-    filter->SetFunction( _TFunction::New( ) );
-    function = filter->GetFunction( );
-
-  } // fi
-  function->SetMinRadius( this->m_Parameters.GetReal( "MinRadius" ) );
-  function->SetMaxRadius( this->m_Parameters.GetReal( "MaxRadius" ) );
-  function->SetRadiusStep( this->m_Parameters.GetReal( "RadiusStep" ) );
-  function->SetRadialSampling( this->m_Parameters.GetUint( "RadialSampling" ) );
-  filter->SetInput( image );
-  filter->Update( );
-  this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
-}
-
-// eof - $RCSfile$