]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Sat, 29 Oct 2016 03:04:09 +0000 (22:04 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Sat, 29 Oct 2016 03:04:09 +0000 (22:04 -0500)
45 files changed:
appli/bash/CreateDemanglers.cxx
lib/Instances/ImageFiltersBases.i
lib/cpPlugins/DataObjects/Image.cxx
lib/cpPlugins/DataObjects/Image.d
lib/cpPlugins/DataObjects/Mesh.cxx
plugins/AnisotropicDiffusion/CurvatureAnisotropicDiffusionImageFilter.cxx
plugins/AnisotropicDiffusion/CurvatureAnisotropicDiffusionImageFilter.h
plugins/CMakeLists.txt
plugins/IO/ImageWriter.cxx
plugins/ImageArithmeticFilters/AddImageFilter.cxx
plugins/ImageArithmeticFilters/AddImageFilter.h
plugins/ImageArithmeticFilters/DivideImageFilter.cxx
plugins/ImageArithmeticFilters/DivideImageFilter.h
plugins/ImageArithmeticFilters/DivideOrZeroOutImageFilter.cxx
plugins/ImageArithmeticFilters/DivideOrZeroOutImageFilter.h
plugins/ImageArithmeticFilters/ImageArithmeticFilters.i [new file with mode: 0644]
plugins/ImageArithmeticFilters/MultiplyImageFilter.cxx
plugins/ImageArithmeticFilters/MultiplyImageFilter.h
plugins/ImageArithmeticFilters/NaryAddImageFilter.cxx [new file with mode: 0644]
plugins/ImageArithmeticFilters/NaryAddImageFilter.h [new file with mode: 0644]
plugins/ImageArithmeticFilters/PowImageFilter.cxx
plugins/ImageArithmeticFilters/PowImageFilter.h
plugins/ImageArithmeticFilters/SubtractImageFilter.cxx
plugins/ImageArithmeticFilters/SubtractImageFilter.h
plugins/ImageBooleanFilters/AndImageFilter.cxx
plugins/ImageBooleanFilters/AndImageFilter.h
plugins/ImageBooleanFilters/ImageBooleanFilters.i [new file with mode: 0644]
plugins/ImageBooleanFilters/OrImageFilter.cxx
plugins/ImageBooleanFilters/OrImageFilter.h
plugins/ImageBooleanFilters/XorImageFilter.cxx
plugins/ImageBooleanFilters/XorImageFilter.h
plugins/ImageDistanceMaps/BinaryContourImageFilter.cxx
plugins/ImageDistanceMaps/SignedMaurerDistanceMapImageFilter.cxx
plugins/ImageGenericFilters/ImageGenericFilters.i [new file with mode: 0644]
plugins/ImageGenericFilters/MinimumMaximumCalculator.cxx
plugins/ImageGenericFilters/MinimumMaximumCalculator.h
plugins/ImageGenericFilters/RegionOfInterestImageFilter.cxx
plugins/ImageGenericFilters/RegionOfInterestImageFilter.h
plugins/ImageGenericFilters/RescaleIntensityImageFilter.cxx
plugins/ImageGradientFilters/GulsunTekImageFilter.cxx
plugins/ImageGradientFilters/GulsunTekImageFilter.h
plugins/ImageGradientFilters/MultiScaleGaussianImageFilter.cxx
plugins/ImageGradientFilters/MultiScaleGaussianImageFilter.h
plugins/Widgets/LineWidget.cxx
plugins/Widgets/SplineWidget.cxx

index 1b34b25e97df8332f66bd045d390d40a74c5541d..0b90d59777f75e175332f3bc7c59ae2c5cc8acf8 100644 (file)
@@ -1,5 +1,7 @@
 #include <bash/Config.h>
 
+#define MAX_NUMBER_OF_INPUTS 9
+
 // -------------------------------------------------------------------------
 int main( int argc, char* argv[] )
 {
@@ -47,8 +49,8 @@ int main( int argc, char* argv[] )
   // Expand data
   std::stringstream data;
   data
-    << "#ifndef __cpPlugins__Demangler__" << object_name << "__h__" << std::endl
-    << "#define __cpPlugins__Demangler__" << object_name << "__h__" << std::endl
+    << "#ifndef __cpPlugins__Demanglers__" << object_name << "__h__" << std::endl
+    << "#define __cpPlugins__Demanglers__" << object_name << "__h__" << std::endl
     << std::endl;
 
   for( auto cIt = commands.begin( ); cIt != commands.end( ); ++cIt )
@@ -60,38 +62,51 @@ int main( int argc, char* argv[] )
     cpPlugins_bash::Expand( instances, definitions, commands, cIt->first );
     TStrings toks;
     cpPlugins_bash::Tokenize( toks, cIt->first, "|" );
-    if( toks.size( ) > 1 )
-    {
-      data
-        << "#define cpPlugins_Demangle_" << object_name << "_"
-        << toks[ 0 ] << "( o, f, ";
-      for( unsigned int i = 1; i < toks.size( ); ++i )
-        data << toks[ i ] << ", ";
-      data << "a ) \\";
-    }
-    else
-      data
-        << "#define cpPlugins_Demangle_" << object_name << "_"
-        << toks[ 0 ] << "( o, f, a ) \\";
-    data << std::endl;
-    std::string prefix = "";
-    for( auto iIt = instances.begin( ); iIt != instances.end( ); ++iIt )
+    for( unsigned int nIns = 1; nIns <= MAX_NUMBER_OF_INPUTS; ++nIns )
     {
-      data
-        << "  " << prefix
-        << "if( dynamic_cast< " << *iIt << "* >( o ) != NULL ) \\"
-        << std::endl
-        << "    this->f( a dynamic_cast< " << *iIt << "* >( o ) ); \\"
-        << std::endl;
-      prefix = "else ";
+      if( toks.size( ) > 1 )
+      {
+        data
+          << "#define cpPlugins_Demangle_" << object_name << "_"
+          << toks[ 0 ] << "_" << nIns << "( o, f";
+        for( unsigned int i = 1; i < toks.size( ); ++i )
+          data << ", " << toks[ i ];
+      }
+      else
+        data
+          << "#define cpPlugins_Demangle_" << object_name << "_"
+          << toks[ 0 ] << "_" << nIns << "( o, f";
+
+      for( unsigned int i = 1; i < nIns; ++i )
+        data << ", X" << i;
+      data << " ) \\";
+
+      data << std::endl;
+      std::string prefix = "";
+      for( auto iIt = instances.begin( ); iIt != instances.end( ); ++iIt )
+      {
+        data
+          << "  " << prefix
+          << "if( dynamic_cast< " << *iIt << "* >( o ) != NULL ) \\"
+          << std::endl
+          << "    this->f( dynamic_cast< " << *iIt << "* >( o )";
+
+        for( unsigned int i = 1; i < nIns; ++i )
+          data << ", X" << i;
+        data
+          << " ); \\"
+          << std::endl;
+        prefix = "else ";
+
+      } // rof
+      data << "  " << prefix << std::endl << std::endl;
 
     } // rof
-    data << "  " << prefix << std::endl << std::endl;
 
   } // rof
 
   data
-    << "#endif // __cpPlugins__Demangler__" << object_name << "__h__"
+    << "#endif // __cpPlugins__Demanglers__" << object_name << "__h__"
     << std::endl;
   if( !( cpPlugins_bash::Write( data.str( ), output_filename ) ) )
   {
@@ -100,20 +115,6 @@ int main( int argc, char* argv[] )
 
   } // fi
 
-
-
-  /* TODO
-     TStrings instances;
-     cpPlugins_bash::Expand( instances, definitions, commands, "instances" );
-
-     // Build all instances
-     for( auto iIt = instances.begin( ); iIt != instances.end( ); ++iIt )
-     {
-     std::cout << *iIt << std::endl;
-
-     } // rof
-  */
-
   return( 0 );
 }
 
index 249c0a8850b59f457c7f01a68280663ecaeab623..8b8805dc0daf499f4b7fa1f59603a438f5e0f3ea 100644 (file)
@@ -22,5 +22,6 @@ instances itk::ImageSource< itk::Image< itk::#matrices#< #real_types#, #process_
 instances itk::ImageSource< itk::Image< itk::Offset< #process_dims# >, #process_dims# > >
 
 instances itk::#filters#< itk::Image< #in_scalar_pixels#, #process_dims# >, itk::Image< #out_scalar_pixels#, #process_dims# > >
+instances itk::#filters#< itk::Image< itk::#color_pixels#< #in_scalar_pixels# >, #process_dims# >, itk::Image< itk::#color_pixels#< #out_scalar_pixels# >, #process_dims# > >
 
 ** eof - $RCSfile$
index 8378b402e94f0d4f70768aadcd734e6a4e845a0f..77e70f664dc7bc5f05270eac371d538253357aba 100644 (file)
@@ -16,8 +16,8 @@ void cpPlugins::DataObjects::Image::
 SetITK( itk::LightObject* o )
 {
   this->Superclass::SetITK( o );
-  cpPlugins_Demangle_Image_VisualDims( o, _ITK_2_VTK_0, )
-    cpPlugins_Demangle_Image_DiffTensors3D( o, _ITK_2_VTK_1, )
+  cpPlugins_Demangle_Image_VisualDims_1( o, _ITK_2_VTK_0 )
+    cpPlugins_Demangle_Image_DiffTensors3D_1( o, _ITK_2_VTK_1 )
   {
     this->m_VTK = NULL;
     this->m_ITKvVTK = NULL;
@@ -102,9 +102,9 @@ template< class _TImage >
 void cpPlugins::DataObjects::Image::
 _ITK_2_VTK_0( _TImage* image )
 {
-  cpPlugins_Demangle_Image_ScalarPixels( image, _ITK_2_VTK_1, _TImage::ImageDimension, )
-    cpPlugins_Demangle_Image_ColorPixels( image, _ITK_2_VTK_1, _TImage::ImageDimension, )
-    cpPlugins_Demangle_Image_VectorPixels( image, _ITK_2_VTK_1, _TImage::ImageDimension, )
+  cpPlugins_Demangle_Image_ScalarPixels_1( image, _ITK_2_VTK_1, _TImage::ImageDimension )
+    cpPlugins_Demangle_Image_ColorPixels_1( image, _ITK_2_VTK_1, _TImage::ImageDimension )
+    cpPlugins_Demangle_Image_VectorPixels_1( image, _ITK_2_VTK_1, _TImage::ImageDimension )
   {
     this->m_VTK = NULL;
     this->m_ITKvVTK = NULL;
index 40ba788c978df83360919ba020b9876a54ad173c..0ed7696e170c8b14d9e6a3d620c0aae5cadb0f9d 100644 (file)
@@ -11,4 +11,13 @@ ColorPixels|d itk::Image< itk::#color_pixels#< #scalar_pixels# >, d >
 VectorPixels|d itk::Image< itk::#vectors#< #real_types#, d >, d >
 DiffTensors3D itk::Image< itk::#diff_tensors#< #real_types# >, 3 >
 
+IntPixels_AllDims itk::Image< #all_ints#, #process_dims# >
+IntPixels_VisualDims itk::Image< #all_ints#, #process_dims# >
+ScalarPixels_AllDims itk::Image< #scalar_pixels#, #process_dims# >
+ScalarPixels_VisualDims itk::Image< #scalar_pixels#, #visual_dims# >
+ColorPixels_AllDims itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# >
+ColorPixels_VisualDims itk::Image< itk::#color_pixels#< #scalar_pixels# >, #visual_dims# >
+VectorPixels_AllDims itk::Image< itk::#vectors#< #real_types#, #process_dims# >, #process_dims# >
+VectorPixels_VisualDims itk::Image< itk::#vectors#< #real_types#, #visual_dims# >, #visual_dims# >
+
 ** eof - $RCSfile$
index e1ce59466ac4055b8651d7eea0c2d54cd8450987..ca2770b37b68b1b9c418b36da4bd52b5a22b1e97 100644 (file)
@@ -12,8 +12,8 @@ void cpPlugins::DataObjects::Mesh::
 SetITK( itk::LightObject* o )
 {
   this->Superclass::SetITK( o );
-  cpPlugins_Demangle_Mesh_Meshes( o, _ITK_2_VTK, 2, )
-    cpPlugins_Demangle_Mesh_Meshes( o, _ITK_2_VTK, 3, )
+  cpPlugins_Demangle_Mesh_Meshes_1( o, _ITK_2_VTK, 2 )
+    cpPlugins_Demangle_Mesh_Meshes_1( o, _ITK_2_VTK, 3 )
   {
     this->m_VTK = NULL;
 
index 41e0c9c25afe979bf9b6564bc75ffc4ce94edf42..d2f2aea8fbf6e0d84370c7f7e824abb8f8bb2576 100644 (file)
@@ -1,17 +1,20 @@
-#include <plugins/AnisotropicDiffusion/CurvatureAnisotropicDiffusionImageFilter.h>
+#include <AnisotropicDiffusion/CurvatureAnisotropicDiffusionImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkCurvatureAnisotropicDiffusionImageFilter.h>
-#include <itkCurvatureNDAnisotropicDiffusionFunction.hxx>
-#include <itkFiniteDifferenceFunction.hxx>
-#include <itkNeighborhoodInnerProduct.hxx>
-#include <itkNeighborhoodOperator.hxx>
-#include <itkFiniteDifferenceImageFilter.hxx>
-#include <itkAnisotropicDiffusionImageFilter.hxx>
-#include <itkDenseFiniteDifferenceImageFilter.hxx>
-#include <itkNeighborhoodAlgorithm.hxx>
-#include <itkDerivativeOperator.hxx>
-#include <itkScalarAnisotropicDiffusionFunction.hxx>
+/* TODO
+   #include <itkCurvatureNDAnisotropicDiffusionFunction.hxx>
+   #include <itkFiniteDifferenceFunction.hxx>
+   #include <itkNeighborhoodInnerProduct.hxx>
+   #include <itkNeighborhoodOperator.hxx>
+   #include <itkFiniteDifferenceImageFilter.hxx>
+   #include <itkAnisotropicDiffusionImageFilter.hxx>
+   #include <itkDenseFiniteDifferenceImageFilter.hxx>
+   #include <itkNeighborhoodAlgorithm.hxx>
+   #include <itkDerivativeOperator.hxx>
+   #include <itkScalarAnisotropicDiffusionFunction.hxx>
+*/
 
 // -------------------------------------------------------------------------
 cpPluginsAnisotropicDiffusion::CurvatureAnisotropicDiffusionImageFilter::
@@ -43,9 +46,8 @@ void cpPluginsAnisotropicDiffusion::CurvatureAnisotropicDiffusionImageFilter::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_ImageScalars( o, _GD0, 2 );
-  else cpPlugins_Demangle_ImageScalars( o, _GD0, 3 );
-  else this->_Error( "No valid input image." );
+  cpPlugins_Demangle_Image_ScalarPixels_VisualDims_1( o, _GD0 )
+    this->_Error( "No valid input image." );
 }
 
 // -------------------------------------------------------------------------
index 850c350558bf39cd62ce333d2c414ec513f48bcb..fb92cd141ee7d9d9b535de708e2d1a55b4a98193 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsAnisotropicDiffusion__CurvatureAnisotropicDiffusionImageFilter__h__
 #define __cpPluginsAnisotropicDiffusion__CurvatureAnisotropicDiffusionImageFilter__h__
 
-#include <plugins/cpPluginsAnisotropicDiffusion_Export.h>
+#include <cpPluginsAnisotropicDiffusion_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsAnisotropicDiffusion
@@ -19,7 +19,7 @@ namespace cpPluginsAnisotropicDiffusion
 
   protected:
     template< class _TImage >
-      inline void _GD0( _TImage* image );
+    inline void _GD0( _TImage* image );
   };
 
 } // ecapseman
index c9cd7e385ee89540aebb0aa3e790890272a4d8ac..e112573285df252377a8d31da86035a001ae845c 100644 (file)
@@ -4,25 +4,25 @@
 
 SET(
   _dirlist
-  #AnisotropicDiffusion
+  AnisotropicDiffusion
   GenericFilters
-  #ImageArithmeticFilters
-  #ImageBooleanFilters
+  ImageArithmeticFilters
+  ImageBooleanFilters
   ImageDistanceMaps
-  #ImageGenericFilters
-  #ImageGradientFilters
+  ImageGenericFilters
+  ImageGradientFilters
   ImageMeshFilters
   ImageSources
   ImageThresholdFilters
   IO
   MeshFilters
   MeshSources
-  #Widgets
+  Widgets
   )
 
-#IF(ParabolicMorphology_LOADED)
-#  LIST(APPEND _dirlist ImageParaMorphologyFilters)
-#ENDIF(ParabolicMorphology_LOADED)
+IF(ParabolicMorphology_LOADED)
+  LIST(APPEND _dirlist ImageParaMorphologyFilters)
+ENDIF(ParabolicMorphology_LOADED)
 
 ## ===============================
 ## == Build each plugin library ==
index 94a822bd2ab1d8f781f85779759558225215658f..8fcf08e7dce05f1a705936975403e724365f7b03 100644 (file)
@@ -118,8 +118,8 @@ void cpPluginsIO::ImageWriter::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_Image_ProcessDims( o, _GD0, )
-    cpPlugins_Demangle_Image_DiffTensors3D( o, _GD1, )
+  cpPlugins_Demangle_Image_ProcessDims_1( o, _GD0 )
+    cpPlugins_Demangle_Image_DiffTensors3D_1( o, _GD1 )
     this->_Error( "Invalid input image dimension." );
 }
 
@@ -128,10 +128,10 @@ template< class _TImage >
 void cpPluginsIO::ImageWriter::
 _GD0( _TImage* image )
 {
-  cpPlugins_Demangle_Image_ScalarPixels( image, _GD1, _TImage::ImageDimension, )
-    cpPlugins_Demangle_Image_ComplexPixels( image, _GD1, _TImage::ImageDimension, )
-    cpPlugins_Demangle_Image_ColorPixels( image, _GD1, _TImage::ImageDimension, )
-    cpPlugins_Demangle_Image_VectorPixels( image, _GD1, _TImage::ImageDimension, )
+  cpPlugins_Demangle_Image_ScalarPixels_1( image, _GD1, _TImage::ImageDimension )
+    cpPlugins_Demangle_Image_ComplexPixels_1( image, _GD1, _TImage::ImageDimension )
+    cpPlugins_Demangle_Image_ColorPixels_1( image, _GD1, _TImage::ImageDimension )
+    cpPlugins_Demangle_Image_VectorPixels_1( image, _GD1, _TImage::ImageDimension )
     this->_Error( "Invalid input image pixel type." );
 }
 
index a0398d6234faa7235290e2651010e00e576e7d3c..35f64ecb45925f52a3df568425694467ebf8ec79 100644 (file)
@@ -1,17 +1,18 @@
-#include <plugins/ImageArithmeticFilters/AddImageFilter.h>
+#include <ImageArithmeticFilters/AddImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkAddImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageArithmeticFilters::AddImageFilter::
 AddImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -24,26 +25,33 @@ cpPluginsImageArithmeticFilters::AddImageFilter::
 void cpPluginsImageArithmeticFilters::AddImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageIntegers_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image (0)." );
 }
 
 // -------------------------------------------------------------------------
-template< class _TImage >
+template< class _TInput1 >
 void cpPluginsImageArithmeticFilters::AddImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TInput1* input1 )
 {
-  typedef itk::AddImageFilter< _TImage, _TImage > _TFilter;
-
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto input2 = this->GetInputData< _TInput1 >( "Input2" );
+  if( input2 == NULL )
     this->_Error( "Incompatible second input image." );
+  this->_GD1( input2, input1 );
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput2, class _TInput1 >
+void cpPluginsImageArithmeticFilters::AddImageFilter::
+_GD1( _TInput2* input2, _TInput1* input1 )
+{
+  typedef itk::AddImageFilter< _TInput1, _TInput2, _TInput1 > _TFilter;
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
+  filter->SetInput1( input1 );
+  filter->SetInput2( input2 );
   filter->Update( );
 
   // Connect output
index 7f48c52da4458e10b5f54792222167583a0bd2f1..ad3222d897e9f27eb92b4e5d5be48fdabc86eba2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageArithmeticFilters__AddImageFilter__h__
 #define __cpPluginsImageArithmeticFilters__AddImageFilter__h__
 
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageArithmeticFilters
@@ -14,12 +14,15 @@ namespace cpPluginsImageArithmeticFilters
     cpPluginsObject(
       AddImageFilter,
       cpPlugins::BaseObjects::ProcessObject,
-      ImageBooleanFilters
+      ImageArithmeticFilters
       );
 
   protected:
-    template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    template< class _TInput1 >
+    inline void _GD0( _TInput1* input1 );
+
+    template< class _TInput2, class _TInput1 >
+    inline void _GD1( _TInput2* input2, _TInput1* input1 );
   };
 
 } // ecapseman
index a802667e20ea4280038527295044be3e24f72958..4c36ae2b95a87b97e9eec535f88bcc747cf9baab 100644 (file)
@@ -1,17 +1,18 @@
-#include <plugins/ImageArithmeticFilters/DivideImageFilter.h>
+#include <ImageArithmeticFilters/DivideImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkDivideImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageArithmeticFilters::DivideImageFilter::
 DivideImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -24,26 +25,33 @@ cpPluginsImageArithmeticFilters::DivideImageFilter::
 void cpPluginsImageArithmeticFilters::DivideImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image (0)." );
 }
 
 // -------------------------------------------------------------------------
-template< class _TImage >
+template< class _TInput1 >
 void cpPluginsImageArithmeticFilters::DivideImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TInput1* input1 )
 {
-  typedef itk::DivideImageFilter< _TImage, _TImage, _TImage > _TFilter;
-
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto input2 = this->GetInputData< _TInput1 >( "Input2" );
+  if( input2 == NULL )
     this->_Error( "Incompatible second input image." );
+  this->_GD1( input2, input1 );
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput2, class _TInput1 >
+void cpPluginsImageArithmeticFilters::DivideImageFilter::
+_GD1( _TInput2* input2, _TInput1* input1 )
+{
+  typedef itk::DivideImageFilter< _TInput1, _TInput2, _TInput1 > _TFilter;
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
+  filter->SetInput1( input1 );
+  filter->SetInput2( input2 );
   filter->Update( );
 
   // Connect output
index 7825c8ca7efd789cd874b3e61b50329115099a4c..c222bf8940384e46f8ca74ec9b1f8687efc142a1 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageArithmeticFilters__DivideImageFilter__h__
 #define __cpPluginsImageArithmeticFilters__DivideImageFilter__h__
 
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageArithmeticFilters
@@ -14,12 +14,15 @@ namespace cpPluginsImageArithmeticFilters
     cpPluginsObject(
       DivideImageFilter,
       cpPlugins::BaseObjects::ProcessObject,
-      ImageBooleanFilters
+      ImageArithmeticFilters
       );
 
   protected:
-    template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    template< class _TInput1 >
+    inline void _GD0( _TInput1* input1 );
+
+    template< class _TInput2, class _TInput1 >
+    inline void _GD1( _TInput2* input2, _TInput1* input1 );
   };
 
 } // ecapseman
index 4a80569c6724a5522e14952eb71870b7ded675b4..959eb02e977de83313fe6c2adaf8b7a112837c35 100644 (file)
@@ -1,20 +1,18 @@
-#include <plugins/ImageArithmeticFilters/DivideOrZeroOutImageFilter.h>
+#include <ImageArithmeticFilters/DivideOrZeroOutImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkDivideOrZeroOutImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageArithmeticFilters::DivideOrZeroOutImageFilter::
 DivideOrZeroOutImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
-
-  this->m_Parameters.ConfigureAsReal( "Threshold" );
-  this->m_Parameters.SetReal( "Threshold", 1e-10 );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -27,27 +25,33 @@ cpPluginsImageArithmeticFilters::DivideOrZeroOutImageFilter::
 void cpPluginsImageArithmeticFilters::DivideOrZeroOutImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image (0)." );
 }
 
 // -------------------------------------------------------------------------
-template< class _TImage >
+template< class _TInput1 >
 void cpPluginsImageArithmeticFilters::DivideOrZeroOutImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TInput1* input1 )
 {
-  typedef itk::DivideOrZeroOutImageFilter< _TImage, _TImage, _TImage > _TFilter;
-
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto input2 = this->GetInputData< _TInput1 >( "Input2" );
+  if( input2 == NULL )
     this->_Error( "Incompatible second input image." );
+  this->_GD1( input2, input1 );
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput2, class _TInput1 >
+void cpPluginsImageArithmeticFilters::DivideOrZeroOutImageFilter::
+_GD1( _TInput2* input2, _TInput1* input1 )
+{
+  typedef itk::DivideOrZeroOutImageFilter< _TInput1, _TInput2, _TInput1 > _TFilter;
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
-  filter->SetThreshold( this->m_Parameters.GetReal( "Threshold" ) );
+  filter->SetInput1( input1 );
+  filter->SetInput2( input2 );
   filter->Update( );
 
   // Connect output
index e7f6ff0caf9e43cf5a09f95b1caf9ce516fb68a0..e2a43a51f7a688ff4ddccccade21378d26547514 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageArithmeticFilters__DivideOrZeroOutImageFilter__h__
 #define __cpPluginsImageArithmeticFilters__DivideOrZeroOutImageFilter__h__
 
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageArithmeticFilters
@@ -14,12 +14,15 @@ namespace cpPluginsImageArithmeticFilters
     cpPluginsObject(
       DivideOrZeroOutImageFilter,
       cpPlugins::BaseObjects::ProcessObject,
-      ImageBooleanFilters
+      ImageArithmeticFilters
       );
 
   protected:
-    template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    template< class _TInput1 >
+    inline void _GD0( _TInput1* input1 );
+
+    template< class _TInput2, class _TInput1 >
+    inline void _GD1( _TInput2* input2, _TInput1* input1 );
   };
 
 } // ecapseman
diff --git a/plugins/ImageArithmeticFilters/ImageArithmeticFilters.i b/plugins/ImageArithmeticFilters/ImageArithmeticFilters.i
new file mode 100644 (file)
index 0000000..f998723
--- /dev/null
@@ -0,0 +1,16 @@
+header #define ITK_MANUAL_INSTANTIATION
+
+define filters=Add;Subtract;Multiply;Divide;DivideOrZeroOut;Pow
+define functors=Add2;Sub2;Mult;Div;DivideOrZeroOut;Pow
+
+tinclude itkBinaryFunctorImageFilter:h|hxx
+tinclude itkNaryFunctorImageFilter:h|hxx
+
+cinclude itk#filters#ImageFilter.h
+cinclude itkNaryAddImageFilter.h
+
+instances itk::BinaryFunctorImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# >, itk::Functor::#functors#< #scalar_pixels#, #scalar_pixels#, #scalar_pixels# > >
+
+instances itk::NaryFunctorImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# >, itk::Functor::Add1< #scalar_pixels#, #scalar_pixels# > >
+
+** eof - $RCSfile$
index 3736968265cdb90f60d4c18ad3aebdc25c8ae9a4..1f839627b906a2e7068966f9e7d6fb9654e759b1 100644 (file)
@@ -1,17 +1,18 @@
-#include <plugins/ImageArithmeticFilters/MultiplyImageFilter.h>
+#include <ImageArithmeticFilters/MultiplyImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkMultiplyImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageArithmeticFilters::MultiplyImageFilter::
 MultiplyImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -24,26 +25,33 @@ cpPluginsImageArithmeticFilters::MultiplyImageFilter::
 void cpPluginsImageArithmeticFilters::MultiplyImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageIntegers_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image (0)." );
 }
 
 // -------------------------------------------------------------------------
-template< class _TImage >
+template< class _TInput1 >
 void cpPluginsImageArithmeticFilters::MultiplyImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TInput1* input1 )
 {
-  typedef itk::MultiplyImageFilter< _TImage, _TImage > _TFilter;
-
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto input2 = this->GetInputData< _TInput1 >( "Input2" );
+  if( input2 == NULL )
     this->_Error( "Incompatible second input image." );
+  this->_GD1( input2, input1 );
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput2, class _TInput1 >
+void cpPluginsImageArithmeticFilters::MultiplyImageFilter::
+_GD1( _TInput2* input2, _TInput1* input1 )
+{
+  typedef itk::MultiplyImageFilter< _TInput1, _TInput2, _TInput1 > _TFilter;
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
+  filter->SetInput1( input1 );
+  filter->SetInput2( input2 );
   filter->Update( );
 
   // Connect output
index 861409640f922dfd599ffec41fbd06b9b681dd85..747bf6b6020ea1db0a135bf9c0c57c2465ae5b2b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageArithmeticFilters__MultiplyImageFilter__h__
 #define __cpPluginsImageArithmeticFilters__MultiplyImageFilter__h__
 
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageArithmeticFilters
@@ -14,12 +14,15 @@ namespace cpPluginsImageArithmeticFilters
     cpPluginsObject(
       MultiplyImageFilter,
       cpPlugins::BaseObjects::ProcessObject,
-      ImageBooleanFilters
+      ImageArithmeticFilters
       );
 
   protected:
-    template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    template< class _TInput1 >
+    inline void _GD0( _TInput1* input1 );
+
+    template< class _TInput2, class _TInput1 >
+    inline void _GD1( _TInput2* input2, _TInput1* input1 );
   };
 
 } // ecapseman
diff --git a/plugins/ImageArithmeticFilters/NaryAddImageFilter.cxx b/plugins/ImageArithmeticFilters/NaryAddImageFilter.cxx
new file mode 100644 (file)
index 0000000..bc48345
--- /dev/null
@@ -0,0 +1,49 @@
+#include <ImageArithmeticFilters/NaryAddImageFilter.h>
+#include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
+
+#include <itkNaryAddImageFilter.h>
+
+// -------------------------------------------------------------------------
+cpPluginsImageArithmeticFilters::NaryAddImageFilter::
+NaryAddImageFilter( )
+  : Superclass( )
+{
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Inputs", true, true );
+  this->_ConfigureOutput< _TImage >( "Output" );
+}
+
+// -------------------------------------------------------------------------
+cpPluginsImageArithmeticFilters::NaryAddImageFilter::
+~NaryAddImageFilter( )
+{
+}
+
+// -------------------------------------------------------------------------
+void cpPluginsImageArithmeticFilters::NaryAddImageFilter::
+_GenerateData( )
+{
+  auto o = this->GetInputData( "Inputs", 0 );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image (0)." );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpPluginsImageArithmeticFilters::NaryAddImageFilter::
+_GD0( _TImage* image1 )
+{
+  typedef itk::NaryAddImageFilter< _TImage, _TImage > _TFilter;
+
+  // Configure filter
+  auto filter = this->_CreateITK< _TFilter >( );
+  filter->SetInput( 0, image1 );
+  unsigned int nInputs = this->GetInputSize( "Inputs" );
+  for( unsigned int i = 1; i < nInputs; ++i )
+    filter->SetInput( i, this->GetInputData< _TImage >( "Inputs", i ) );
+  filter->Update( );
+  this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
+}
+
+// eof - $RCSfile$
diff --git a/plugins/ImageArithmeticFilters/NaryAddImageFilter.h b/plugins/ImageArithmeticFilters/NaryAddImageFilter.h
new file mode 100644 (file)
index 0000000..dc104a9
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __cpPluginsImageArithmeticFilters__NaryAddImageFilter__h__
+#define __cpPluginsImageArithmeticFilters__NaryAddImageFilter__h__
+
+#include <cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPlugins/BaseObjects/ProcessObject.h>
+
+namespace cpPluginsImageArithmeticFilters
+{
+  /**
+   */
+  class cpPluginsImageArithmeticFilters_EXPORT NaryAddImageFilter
+    : public cpPlugins::BaseObjects::ProcessObject
+  {
+    cpPluginsObject(
+      NaryAddImageFilter,
+      cpPlugins::BaseObjects::ProcessObject,
+      ImageArithmeticFilters
+      );
+
+  protected:
+    template< class _TImage >
+    inline void _GD0( _TImage* image1 );
+  };
+
+} // ecapseman
+
+#endif // __cpPluginsImageArithmeticFilters__NaryAddImageFilter__h__
+
+// eof - $RCSfile$
index f0b4c8e09feb8cb8f0cdbd3a4097e347659d6626..62c2a8561168f12fb0faf83640aa222fe379d39d 100644 (file)
@@ -1,17 +1,18 @@
-#include <plugins/ImageArithmeticFilters/PowImageFilter.h>
+#include <ImageArithmeticFilters/PowImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkPowImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageArithmeticFilters::PowImageFilter::
 PowImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", false, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 
   this->m_Parameters.ConfigureAsReal( "Constant" );
   this->m_Parameters.SetReal( "Constant", 1 );
@@ -27,26 +28,33 @@ cpPluginsImageArithmeticFilters::PowImageFilter::
 void cpPluginsImageArithmeticFilters::PowImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image (0)." );
 }
 
 // -------------------------------------------------------------------------
-template< class _TImage >
+template< class _TInput1 >
 void cpPluginsImageArithmeticFilters::PowImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TInput1* input1 )
 {
-  typedef itk::PowImageFilter< _TImage, _TImage > _TFilter;
+  auto input2 = this->GetInputData< _TInput1 >( "Input2" );
+  if( input2 == NULL )
+    this->_Error( "Incompatible second input image." );
+  this->_GD1( input2, input1 );
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput2, class _TInput1 >
+void cpPluginsImageArithmeticFilters::PowImageFilter::
+_GD1( _TInput2* input2, _TInput1* input1 )
+{
+  typedef itk::PowImageFilter< _TInput1, _TInput2, _TInput1 > _TFilter;
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput1( image0 );
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
-    filter->SetConstant( this->m_Parameters.GetReal( "Constant" ) );
-  else
-    filter->SetInput2( image1 );
+  filter->SetInput1( input1 );
+  filter->SetInput2( input2 );
   filter->Update( );
 
   // Connect output
@@ -54,3 +62,18 @@ _GD0( _TImage* image0 )
 }
 
 // eof - $RCSfile$
+
+/* TODO
+   filter->SetInput1( image0 );
+   auto image1 = this->GetInputData< _TImage >( "Input1" );
+   if( image1 == NULL )
+   filter->SetConstant( this->m_Parameters.GetReal( "Constant" ) );
+   else
+   filter->SetInput2( image1 );
+   filter->Update( );
+
+   // Connect output
+   this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
+*/
+
+// eof - $RCSfile$
index 4882c6a51d0239ccfcf45b1bc4f2caa009a55922..53de79a71fa0597b97ff74cb399b85d4fbcad8fd 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageArithmeticFilters__PowImageFilter__h__
 #define __cpPluginsImageArithmeticFilters__PowImageFilter__h__
 
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageArithmeticFilters
@@ -14,12 +14,15 @@ namespace cpPluginsImageArithmeticFilters
     cpPluginsObject(
       PowImageFilter,
       cpPlugins::BaseObjects::ProcessObject,
-      ImageBooleanFilters
+      ImageArithmeticFilters
       );
 
   protected:
-    template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    template< class _TInput1 >
+    inline void _GD0( _TInput1* input1 );
+
+    template< class _TInput2, class _TInput1 >
+    inline void _GD1( _TInput2* input2, _TInput1* input1 );
   };
 
 } // ecapseman
index 0b0c1cf1359d550c95cfae6bf4219f361af07eef..5081d5446051f5e060be2af417375deeb7a1d66d 100644 (file)
@@ -1,17 +1,18 @@
-#include <plugins/ImageArithmeticFilters/SubtractImageFilter.h>
+#include <ImageArithmeticFilters/SubtractImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkSubtractImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageArithmeticFilters::SubtractImageFilter::
 SubtractImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -24,26 +25,33 @@ cpPluginsImageArithmeticFilters::SubtractImageFilter::
 void cpPluginsImageArithmeticFilters::SubtractImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageIntegers_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image (0)." );
 }
 
 // -------------------------------------------------------------------------
-template< class _TImage >
+template< class _TInput1 >
 void cpPluginsImageArithmeticFilters::SubtractImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TInput1* input1 )
 {
-  typedef itk::SubtractImageFilter< _TImage, _TImage > _TFilter;
-
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto input2 = this->GetInputData< _TInput1 >( "Input2" );
+  if( input2 == NULL )
     this->_Error( "Incompatible second input image." );
+  this->_GD1( input2, input1 );
+}
+
+// -------------------------------------------------------------------------
+template< class _TInput2, class _TInput1 >
+void cpPluginsImageArithmeticFilters::SubtractImageFilter::
+_GD1( _TInput2* input2, _TInput1* input1 )
+{
+  typedef itk::SubtractImageFilter< _TInput1, _TInput2, _TInput1 > _TFilter;
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
+  filter->SetInput1( input1 );
+  filter->SetInput2( input2 );
   filter->Update( );
 
   // Connect output
index f8e529ff106b5bb1a3a537b92dd559c268746887..c097aa892a362a4c1f4bc1d939e6bb35a9cf6a87 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageArithmeticFilters__SubtractImageFilter__h__
 #define __cpPluginsImageArithmeticFilters__SubtractImageFilter__h__
 
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageArithmeticFilters
@@ -14,12 +14,15 @@ namespace cpPluginsImageArithmeticFilters
     cpPluginsObject(
       SubtractImageFilter,
       cpPlugins::BaseObjects::ProcessObject,
-      ImageBooleanFilters
+      ImageArithmeticFilters
       );
 
   protected:
-    template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    template< class _TInput1 >
+    inline void _GD0( _TInput1* input1 );
+
+    template< class _TInput2, class _TInput1 >
+    inline void _GD1( _TInput2* input2, _TInput1* input1 );
   };
 
 } // ecapseman
index 130791977fbdb0e48a4999869fd732a4bf8c20d4..27194ae2eac408417345efc110d6f5c7685326d7 100644 (file)
@@ -1,17 +1,19 @@
-#include <plugins/ImageBooleanFilters/AndImageFilter.h>
+#include <ImageBooleanFilters/AndImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkAndImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageBooleanFilters::AndImageFilter::
 AndImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -24,26 +26,26 @@ cpPluginsImageBooleanFilters::AndImageFilter::
 void cpPluginsImageBooleanFilters::AndImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageIntegers_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_IntPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
 template< class _TImage >
 void cpPluginsImageBooleanFilters::AndImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TImage* image1 )
 {
   typedef itk::AndImageFilter< _TImage, _TImage > _TFilter;
 
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto image2 = this->GetInputData< _TImage >( "Input2" );
+  if( image2 == NULL )
     this->_Error( "Incompatible second input image." );
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
+  filter->SetInput1( image1 );
+  filter->SetInput2( image2 );
   filter->Update( );
 
   // Connect output
index d8fdc61e0eeacd61ba2c1ede1ea372af2c89d40e..037038bcc3c9339ef8a3060ca6c9d28b436ea410 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageBooleanFilters__AndImageFilter__h__
 #define __cpPluginsImageBooleanFilters__AndImageFilter__h__
 
-#include <plugins/cpPluginsImageBooleanFilters_Export.h>
+#include <cpPluginsImageBooleanFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageBooleanFilters
@@ -19,7 +19,7 @@ namespace cpPluginsImageBooleanFilters
 
   protected:
     template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    inline void _GD0( _TImage* image1 );
   };
 
 } // ecapseman
diff --git a/plugins/ImageBooleanFilters/ImageBooleanFilters.i b/plugins/ImageBooleanFilters/ImageBooleanFilters.i
new file mode 100644 (file)
index 0000000..4fc6e7a
--- /dev/null
@@ -0,0 +1,12 @@
+header #define ITK_MANUAL_INSTANTIATION
+
+define filters=And;Or;Xor
+define functors=AND;OR;XOR
+define all_ints=#int_types#;unsigned #int_types#
+
+tinclude itkBinaryFunctorImageFilter:h|hxx
+cinclude itk#filters#ImageFilter.h
+
+instances itk::BinaryFunctorImageFilter< itk::Image< #all_ints#, #process_dims# >, itk::Image< #all_ints#, #process_dims# >, itk::Image< #all_ints#, #process_dims# >, itk::Functor::#functors#< #all_ints#, #all_ints#, #all_ints# > >
+
+** eof - $RCSfile$
index af04700985d8ead9e216138d6566080d93b91f2d..3c7712a98dfeaa28c656421e434b1cbd4b7cb92b 100644 (file)
@@ -1,17 +1,19 @@
-#include <plugins/ImageBooleanFilters/OrImageFilter.h>
+#include <ImageBooleanFilters/OrImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkOrImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageBooleanFilters::OrImageFilter::
 OrImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -24,26 +26,26 @@ cpPluginsImageBooleanFilters::OrImageFilter::
 void cpPluginsImageBooleanFilters::OrImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageIntegers_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_IntPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
 template< class _TImage >
 void cpPluginsImageBooleanFilters::OrImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TImage* image1 )
 {
   typedef itk::OrImageFilter< _TImage, _TImage > _TFilter;
 
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto image2 = this->GetInputData< _TImage >( "Input2" );
+  if( image2 == NULL )
     this->_Error( "Incompatible second input image." );
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
+  filter->SetInput1( image1 );
+  filter->SetInput2( image2 );
   filter->Update( );
 
   // Connect output
index 426ccbef601cc98b8004b804a9683e2720d7b2e0..c7522b96f81deda9487acc874e6f3471e058f244 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageBooleanFilters__OrImageFilter__h__
 #define __cpPluginsImageBooleanFilters__OrImageFilter__h__
 
-#include <plugins/cpPluginsImageBooleanFilters_Export.h>
+#include <cpPluginsImageBooleanFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageBooleanFilters
@@ -19,7 +19,7 @@ namespace cpPluginsImageBooleanFilters
 
   protected:
     template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    inline void _GD0( _TImage* image1 );
   };
 
 } // ecapseman
index fdb0a5dc8358ba7b7738181dd97ba667d4115ef2..30dd6f52bfab7c545d31854813e36d5f987cf580 100644 (file)
@@ -1,17 +1,19 @@
-#include <plugins/ImageBooleanFilters/XorImageFilter.h>
+#include <ImageBooleanFilters/XorImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkXorImageFilter.h>
-#include <itkBinaryFunctorImageFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageBooleanFilters::XorImageFilter::
 XorImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input0", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input1", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+
+  this->_ConfigureInput< _TImage >( "Input1", true, false );
+  this->_ConfigureInput< _TImage >( "Input2", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -24,26 +26,26 @@ cpPluginsImageBooleanFilters::XorImageFilter::
 void cpPluginsImageBooleanFilters::XorImageFilter::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input0" );
-  cpPlugins_Demangle_ImageIntegers_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  auto o = this->GetInputData( "Input1" );
+  cpPlugins_Demangle_Image_IntPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
 template< class _TImage >
 void cpPluginsImageBooleanFilters::XorImageFilter::
-_GD0( _TImage* image0 )
+_GD0( _TImage* image1 )
 {
   typedef itk::XorImageFilter< _TImage, _TImage > _TFilter;
 
-  auto image1 = this->GetInputData< _TImage >( "Input1" );
-  if( image1 == NULL )
+  auto image2 = this->GetInputData< _TImage >( "Input2" );
+  if( image2 == NULL )
     this->_Error( "Incompatible second input image." );
 
   // Configure filter
   auto filter = this->_CreateITK< _TFilter >( );
-  filter->SetInput( 0, image0 );
-  filter->SetInput( 1, image1 );
+  filter->SetInput1( image1 );
+  filter->SetInput2( image2 );
   filter->Update( );
 
   // Connect output
index ab121f538724efe8a066728d5e36bc06170178ea..3005c18903290e04d6a6916b3025350c0011013b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageBooleanFilters__XorImageFilter__h__
 #define __cpPluginsImageBooleanFilters__XorImageFilter__h__
 
-#include <plugins/cpPluginsImageBooleanFilters_Export.h>
+#include <cpPluginsImageBooleanFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageBooleanFilters
@@ -19,7 +19,7 @@ namespace cpPluginsImageBooleanFilters
 
   protected:
     template< class _TImage >
-      inline void _GD0( _TImage* image0 );
+    inline void _GD0( _TImage* image1 );
   };
 
 } // ecapseman
index c6d0e165767b36cd9a5fb3f9648a26fd9bf80447..ade258036a556c3fe4dcf07f7cf0a9e3aed80a3d 100644 (file)
@@ -34,7 +34,7 @@ void cpPluginsImageDistanceMaps::BinaryContourImageFilter::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_Image_VisualDims( o, _GD0, )
+  cpPlugins_Demangle_Image_VisualDims_1( o, _GD0 )
     this->_Error( "Invalid input image dimension." );
 }
 
@@ -43,7 +43,7 @@ template< class _TImage >
 void cpPluginsImageDistanceMaps::BinaryContourImageFilter::
 _GD0( _TImage* image )
 {
-  cpPlugins_Demangle_Image_ScalarPixels( image, _GD1, _TImage::ImageDimension, )
+  cpPlugins_Demangle_Image_ScalarPixels_1( image, _GD1, _TImage::ImageDimension )
     this->_Error( "Invalid input image pixel type." );
 }
 
index d34d1df308ec20bfc61f986bd7f6b3e7a1ab90f4..89b52f7ca8a86694ee8437059bb1cf33064e8f84 100644 (file)
@@ -45,7 +45,7 @@ void cpPluginsImageDistanceMaps::SignedMaurerDistanceMapImageFilter::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_Image_VisualDims( o, _GD0, )
+  cpPlugins_Demangle_Image_VisualDims_1( o, _GD0 )
     this->_Error( "Invalid input image dimension." );
 }
 
@@ -54,7 +54,7 @@ template< class _TImage >
 void cpPluginsImageDistanceMaps::SignedMaurerDistanceMapImageFilter::
 _GD0( _TImage* image )
 {
-  cpPlugins_Demangle_Image_ScalarPixels( image, _GD1, _TImage::ImageDimension, )
+  cpPlugins_Demangle_Image_ScalarPixels_1( image, _GD1, _TImage::ImageDimension )
     this->_Error( "Invalid input image pixel type." );
 }
 
diff --git a/plugins/ImageGenericFilters/ImageGenericFilters.i b/plugins/ImageGenericFilters/ImageGenericFilters.i
new file mode 100644 (file)
index 0000000..5ddb452
--- /dev/null
@@ -0,0 +1,18 @@
+header #define ITK_MANUAL_INSTANTIATION
+
+tinclude itkRegionOfInterestImageFilter:h|hxx
+tinclude itkRescaleIntensityImageFilter:h|hxx
+tinclude itkMinimumMaximumImageCalculator:h|hxx
+
+cinclude itk#color_pixels#.h
+cinclude itkImageAlgorithm.hxx
+cinclude itkUnaryFunctorImageFilter.hxx
+
+instances itk::RegionOfInterestImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
+instances itk::RegionOfInterestImageFilter< itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# >, itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# > >
+
+instances itk::RescaleIntensityImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
+
+instances itk::MinimumMaximumImageCalculator< itk::Image< #scalar_pixels#, #process_dims# > >
+
+** eof - $RCSfile$
index 822f61fb3ef02ea883f64f44f18a4f3aca513708..df327b841205057bac3dbde7c448ad5923332e85 100644 (file)
@@ -1,17 +1,23 @@
 #include <ImageGenericFilters/MinimumMaximumCalculator.h>
 #include <cpPlugins/DataObjects/Image.h>
 #include <cpPlugins/DataObjects/Mesh.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
+#include <itkImage.h>
 #include <itkMinimumMaximumImageCalculator.h>
+#include <vtkPolyData.h>
 
 // -------------------------------------------------------------------------
 cpPluginsImageGenericFilters::MinimumMaximumCalculator::
 MinimumMaximumCalculator( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Mesh >( "Maximum" );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Mesh >( "Minimum" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpPlugins::DataObjects::Mesh _TMesh;
+
+  this->_ConfigureInput< _TImage >( "Input", true, false );
+  this->_ConfigureOutput< _TMesh >( "Maximum" );
+  this->_ConfigureOutput< _TMesh >( "Minimum" );
 }
 
 // -------------------------------------------------------------------------
@@ -25,8 +31,8 @@ void cpPluginsImageGenericFilters::MinimumMaximumCalculator::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
index 695cb84ef40b6cdc3d287231b6d453ee45ce6045..0459a3bf2bdccd752770644f71d998efaacabd92 100644 (file)
@@ -19,7 +19,7 @@ namespace cpPluginsImageGenericFilters
 
   protected:
     template< class _TImage >
-      inline void _GD0( _TImage* input );
+    inline void _GD0( _TImage* input );
   };
 
 } // ecapseman
index b6bc5465f2f37f49c137c020c2f65731009b1abe..e73ac5928a836cd709074b4ab7407ba7a3a98294 100644 (file)
@@ -1,7 +1,10 @@
 #include <ImageGenericFilters/RegionOfInterestImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
 #include <cpPlugins/DataObjects/BoundingBox.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
+#include <itkRGBPixel.h>
+#include <itkRGBAPixel.h>
 #include <itkRegionOfInterestImageFilter.h>
 
 // -------------------------------------------------------------------------
@@ -9,9 +12,11 @@ cpPluginsImageGenericFilters::RegionOfInterestImageFilter::
 RegionOfInterestImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input", true, false );
-  this->_ConfigureInput< cpPlugins::DataObjects::BoundingBox >( "BoundingBox", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpPlugins::DataObjects::BoundingBox _TBBox;
+  this->_ConfigureInput< _TImage >( "Input", true, false );
+  this->_ConfigureInput< _TBBox >( "BoundingBox", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 }
 
 // -------------------------------------------------------------------------
@@ -25,8 +30,9 @@ void cpPluginsImageGenericFilters::RegionOfInterestImageFilter::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    cpPlugins_Demangle_Image_ColorPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
@@ -34,13 +40,14 @@ template< class _TImage >
 void cpPluginsImageGenericFilters::RegionOfInterestImageFilter::
 _GD0( _TImage* input )
 {
+  typedef cpPlugins::DataObjects::BoundingBox _TBBox;
   typedef itk::RegionOfInterestImageFilter< _TImage, _TImage > _TFilter;
   typedef typename _TImage::IndexType  _TIndex;
   typedef typename _TImage::PointType  _TPoint;
   typedef typename _TImage::RegionType _TRegion;
   typedef typename _TImage::SizeType   _TSize;
 
-  auto bb = this->GetInput< cpPlugins::DataObjects::BoundingBox >( "BoundingBox" );
+  auto bb = this->GetInput< _TBBox >( "BoundingBox" );
 
   _TIndex i0, i1;
   input->TransformPhysicalPointToIndex( bb->GetMinimum< _TPoint >( ), i0 );
index 1f2f2c53389323b7373c45c7f64e60941a6842b3..04be0a5a4ebb53379c764e78346c47e85de5306f 100644 (file)
@@ -19,7 +19,7 @@ namespace cpPluginsImageGenericFilters
 
   protected:
     template< class _TImage >
-      inline void _GD0( _TImage* input );
+    inline void _GD0( _TImage* input );
   };
 
 } // ecapseman
index 52a3635bf641742eb389f50a146cffcb859a63bf..38681d9a8cbefd2fb8cb18814228f4f2e426af43 100644 (file)
@@ -1,5 +1,6 @@
 #include <ImageGenericFilters/RescaleIntensityImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <itkRescaleIntensityImageFilter.h>
 
@@ -8,8 +9,9 @@ cpPluginsImageGenericFilters::RescaleIntensityImageFilter::
 RescaleIntensityImageFilter( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::Image >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  this->_ConfigureInput< _TImage >( "Input", true, false );
+  this->_ConfigureOutput< _TImage >( "Output" );
 
   this->m_Parameters.ConfigureAsReal( "OutputMinimum" );
   this->m_Parameters.ConfigureAsReal( "OutputMaximum" );
@@ -29,8 +31,8 @@ void cpPluginsImageGenericFilters::RescaleIntensityImageFilter::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
index b707d0067a791867518159079ca528609a3e83e1..52525d9c1633d3698c54e8bd2328c7e2678782d7 100644 (file)
@@ -1,13 +1,16 @@
-#include <plugins/ImageGradientFilters/GulsunTekImageFilter.h>
+#include <ImageGradientFilters/GulsunTekImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demangler.h>
+/* TODO
+   #include <cpExtensions/Algorithms/ImageFunctionFilter.h>
+   #include <cpExtensions/Algorithms/GulsunTekMedialness.h>
 
-#include <cpExtensions/Algorithms/ImageFunctionFilter.h>
-#include <cpExtensions/Algorithms/GulsunTekMedialness.h>
-
-#include <cpExtensions/Algorithms/ImageFunctionFilter.hxx>
-#include <cpExtensions/Algorithms/GulsunTekMedialness.hxx>
-#include <cpExtensions/Algorithms/GradientImageFunctionBase.hxx>
-#include <itkImageFunction.hxx>
+   #include <cpExtensions/Algorithms/ImageFunctionFilter.hxx>
+   #include <cpExtensions/Algorithms/GulsunTekMedialness.hxx>
+   #include <cpExtensions/Algorithms/GradientImageFunctionBase.hxx>
+   #include <itkImageFunction.hxx>
+*/
 
 // -------------------------------------------------------------------------
 cpPluginsImageGradientFilters::GulsunTekImageFilter::
index aafa51f16886dee3b6334f681f35a529e2232446..e48623c04fc08ba16fda33b9d26c2ad87d837a85 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageGradientFilters__GulsunTekImageFilter__h__
 #define __cpPluginsImageGradientFilters__GulsunTekImageFilter__h__
 
-#include <plugins/cpPluginsImageGradientFilters_Export.h>
+#include <cpPluginsImageGradientFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageGradientFilters
index a95cacb5a69e8904c58ec80141447f64105d962a..d4e74e8eee796a00ee96fd3a884470149d4b2411 100644 (file)
@@ -1,18 +1,22 @@
-#include <plugins/ImageGradientFilters/MultiScaleGaussianImageFilter.h>
+#include <ImageGradientFilters/MultiScaleGaussianImageFilter.h>
 #include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
 
 #include <cpExtensions/Algorithms/MultiScaleGaussianImageFilter.h>
-#include <cpExtensions/Algorithms/MultiScaleGaussianImageFilter.hxx>
-#include <itkGradientRecursiveGaussianImageFilter.hxx>
-#include <itkRecursiveGaussianImageFilter.hxx>
-#include <itkImageAdaptor.hxx>
-#include <itkUnaryFunctorImageFilter.hxx>
-#include <itkImageConstIteratorWithIndex.hxx>
-#include <itkBinaryFunctorImageFilter.hxx>
-#include <itkImageRegionIteratorWithIndex.hxx>
-#include <itkInPlaceImageFilter.hxx>
-#include <itkImageRegionConstIteratorWithIndex.hxx>
-#include <itkSimpleDataObjectDecorator.hxx>
+
+/* TODO
+   #include <cpExtensions/Algorithms/MultiScaleGaussianImageFilter.hxx>
+   #include <itkGradientRecursiveGaussianImageFilter.hxx>
+   #include <itkRecursiveGaussianImageFilter.hxx>
+   #include <itkImageAdaptor.hxx>
+   #include <itkUnaryFunctorImageFilter.hxx>
+   #include <itkImageConstIteratorWithIndex.hxx>
+   #include <itkBinaryFunctorImageFilter.hxx>
+   #include <itkImageRegionIteratorWithIndex.hxx>
+   #include <itkInPlaceImageFilter.hxx>
+   #include <itkImageRegionConstIteratorWithIndex.hxx>
+   #include <itkSimpleDataObjectDecorator.hxx>
+*/
 
 // -------------------------------------------------------------------------
 cpPluginsImageGradientFilters::MultiScaleGaussianImageFilter::
@@ -42,8 +46,8 @@ void cpPluginsImageGradientFilters::MultiScaleGaussianImageFilter::
 _GenerateData( )
 {
   auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+    this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
index 9781cb34b88d08c28a7e822ab5d287a8c2ae2879..29b0b6f0eb6079bf4ac569edd358d7bc345b259a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __cpPluginsImageGradientFilters__MultiScaleGaussianImageFilter__h__
 #define __cpPluginsImageGradientFilters__MultiScaleGaussianImageFilter__h__
 
-#include <plugins/cpPluginsImageGradientFilters_Export.h>
+#include <cpPluginsImageGradientFilters_Export.h>
 #include <cpPlugins/BaseObjects/ProcessObject.h>
 
 namespace cpPluginsImageGradientFilters
@@ -19,10 +19,10 @@ namespace cpPluginsImageGradientFilters
 
   protected:
     template< class _TImage >
-      inline void _GD0( _TImage* image );
+    inline void _GD0( _TImage* image );
 
     template< class _TInputImage, class _TScalar >
-      inline void _GD1( _TInputImage* o );
+    inline void _GD1( _TInputImage* o );
   };
 
 } // ecapseman
index f072a94a7e6ea18fdce748c8e231e63131857f55..ab7e32007510d77b49e7f13d461922beed413727 100644 (file)
@@ -9,6 +9,7 @@
 #include <vtkInteractorObserver.h>
 #include <vtkLineRepresentation.h>
 #include <vtkMapper.h>
+#include <vtkPolyData.h>
 #include <vtkRenderer.h>
 
 // -------------------------------------------------------------------------
index bb68821a6095a9efd6da877f876566e1be76323b..258c0bd677a43e923f501aeb51001f9565e3b112 100644 (file)
@@ -6,6 +6,7 @@
 #include <itkVector.h>
 
 #include <vtkImageData.h>
+#include <vtkPolyData.h>
 #include <vtkRenderer.h>
 #include <vtkSplineWidget.h>
 #include <vtkParametricSpline.h>