#include <bash/Config.h>
+#define MAX_NUMBER_OF_INPUTS 9
+
// -------------------------------------------------------------------------
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 )
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 ) ) )
{
} // 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 );
}
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$
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;
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;
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$
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;
-#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::
_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." );
}
// -------------------------------------------------------------------------
#ifndef __cpPluginsAnisotropicDiffusion__CurvatureAnisotropicDiffusionImageFilter__h__
#define __cpPluginsAnisotropicDiffusion__CurvatureAnisotropicDiffusionImageFilter__h__
-#include <plugins/cpPluginsAnisotropicDiffusion_Export.h>
+#include <cpPluginsAnisotropicDiffusion_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
namespace cpPluginsAnisotropicDiffusion
protected:
template< class _TImage >
- inline void _GD0( _TImage* image );
+ inline void _GD0( _TImage* image );
};
} // ecapseman
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 ==
_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." );
}
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." );
}
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageArithmeticFilters__AddImageFilter__h__
#define __cpPluginsImageArithmeticFilters__AddImageFilter__h__
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
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
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageArithmeticFilters__DivideImageFilter__h__
#define __cpPluginsImageArithmeticFilters__DivideImageFilter__h__
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
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
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageArithmeticFilters__DivideOrZeroOutImageFilter__h__
#define __cpPluginsImageArithmeticFilters__DivideOrZeroOutImageFilter__h__
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
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
--- /dev/null
+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$
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageArithmeticFilters__MultiplyImageFilter__h__
#define __cpPluginsImageArithmeticFilters__MultiplyImageFilter__h__
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
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
--- /dev/null
+#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$
--- /dev/null
+#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$
-#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 );
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
}
// 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$
#ifndef __cpPluginsImageArithmeticFilters__PowImageFilter__h__
#define __cpPluginsImageArithmeticFilters__PowImageFilter__h__
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
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
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageArithmeticFilters__SubtractImageFilter__h__
#define __cpPluginsImageArithmeticFilters__SubtractImageFilter__h__
-#include <plugins/cpPluginsImageArithmeticFilters_Export.h>
+#include <cpPluginsImageArithmeticFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
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
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageBooleanFilters__AndImageFilter__h__
#define __cpPluginsImageBooleanFilters__AndImageFilter__h__
-#include <plugins/cpPluginsImageBooleanFilters_Export.h>
+#include <cpPluginsImageBooleanFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
namespace cpPluginsImageBooleanFilters
protected:
template< class _TImage >
- inline void _GD0( _TImage* image0 );
+ inline void _GD0( _TImage* image1 );
};
} // ecapseman
--- /dev/null
+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$
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageBooleanFilters__OrImageFilter__h__
#define __cpPluginsImageBooleanFilters__OrImageFilter__h__
-#include <plugins/cpPluginsImageBooleanFilters_Export.h>
+#include <cpPluginsImageBooleanFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
namespace cpPluginsImageBooleanFilters
protected:
template< class _TImage >
- inline void _GD0( _TImage* image0 );
+ inline void _GD0( _TImage* image1 );
};
} // ecapseman
-#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" );
}
// -------------------------------------------------------------------------
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
#ifndef __cpPluginsImageBooleanFilters__XorImageFilter__h__
#define __cpPluginsImageBooleanFilters__XorImageFilter__h__
-#include <plugins/cpPluginsImageBooleanFilters_Export.h>
+#include <cpPluginsImageBooleanFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
namespace cpPluginsImageBooleanFilters
protected:
template< class _TImage >
- inline void _GD0( _TImage* image0 );
+ inline void _GD0( _TImage* image1 );
};
} // ecapseman
_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." );
}
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." );
}
_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." );
}
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." );
}
--- /dev/null
+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$
#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" );
}
// -------------------------------------------------------------------------
_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." );
}
// -------------------------------------------------------------------------
protected:
template< class _TImage >
- inline void _GD0( _TImage* input );
+ inline void _GD0( _TImage* input );
};
} // ecapseman
#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>
// -------------------------------------------------------------------------
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" );
}
// -------------------------------------------------------------------------
_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." );
}
// -------------------------------------------------------------------------
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 );
protected:
template< class _TImage >
- inline void _GD0( _TImage* input );
+ inline void _GD0( _TImage* input );
};
} // ecapseman
#include <ImageGenericFilters/RescaleIntensityImageFilter.h>
#include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
#include <itkRescaleIntensityImageFilter.h>
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" );
_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." );
}
// -------------------------------------------------------------------------
-#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::
#ifndef __cpPluginsImageGradientFilters__GulsunTekImageFilter__h__
#define __cpPluginsImageGradientFilters__GulsunTekImageFilter__h__
-#include <plugins/cpPluginsImageGradientFilters_Export.h>
+#include <cpPluginsImageGradientFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
namespace cpPluginsImageGradientFilters
-#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::
_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." );
}
// -------------------------------------------------------------------------
#ifndef __cpPluginsImageGradientFilters__MultiScaleGaussianImageFilter__h__
#define __cpPluginsImageGradientFilters__MultiScaleGaussianImageFilter__h__
-#include <plugins/cpPluginsImageGradientFilters_Export.h>
+#include <cpPluginsImageGradientFilters_Export.h>
#include <cpPlugins/BaseObjects/ProcessObject.h>
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
#include <vtkInteractorObserver.h>
#include <vtkLineRepresentation.h>
#include <vtkMapper.h>
+#include <vtkPolyData.h>
#include <vtkRenderer.h>
// -------------------------------------------------------------------------
#include <itkVector.h>
#include <vtkImageData.h>
+#include <vtkPolyData.h>
#include <vtkRenderer.h>
#include <vtkSplineWidget.h>
#include <vtkParametricSpline.h>