]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/ProcessObject.h
MAC compilation issues solved... Now some tests please
[cpPlugins.git] / lib / cpPlugins / Interface / ProcessObject.h
index ee5beddc025258d57c24e77c4faedf0de802ce60..e139c994d5e86f9107963ae6acea31fcd626d564 100644 (file)
@@ -1,18 +1,29 @@
 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
 
-#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
-#include <cpPlugins/Interface/Object.h>
-#include <cpPlugins/Interface/DataObject.h>
+#include <map>
+#include <set>
+
+#include <itkDataObject.h>
+#include <cpPlugins/Interface/ProcessObjectPort.h>
 #include <cpPlugins/Interface/Parameters.h>
 
-#define ITK_MANUAL_INSTANTIATION
-#include <itkProcessObject.h>
+// Some forward declarations
+class vtkRenderWindowInteractor;
 
 namespace cpPlugins
 {
   namespace Interface
   {
+    // Some forward declarations
+#ifdef cpPlugins_Interface_QT4
+    class ParametersQtDialog;
+    class SimpleMPRWidget;
+#else
+    typedef char ParametersQtDialog;
+    typedef char SimpleMPRWidget;
+#endif // cpPlugins_Interface_QT4
+
     /**
      */
     class cpPlugins_Interface_EXPORT ProcessObject
@@ -24,43 +35,70 @@ namespace cpPlugins
       typedef itk::SmartPointer< Self >       Pointer;
       typedef itk::SmartPointer< const Self > ConstPointer;
 
+      typedef Parameters TParameters;
+      typedef std::set< vtkRenderWindowInteractor* > TInteractors;
+      typedef bool DialogResult;
+
     public:
       itkTypeMacro( ProcessObject, Object );
+      cpPlugins_Id_Macro( ProcessObject, BaseObject );
+
+      itkGetConstObjectMacro( Parameters, TParameters );
+
+      itkGetObjectMacro( Parameters, TParameters );
+      itkGetMacro( ParametersDialog, ParametersQtDialog* );
+      itkGetMacro( SingleInteractor, vtkRenderWindowInteractor* );
+      itkGetMacro( MPRViewer, SimpleMPRWidget* );
+
+      itkSetObjectMacro( ParametersDialog, ParametersQtDialog );
+      itkSetObjectMacro( SingleInteractor, vtkRenderWindowInteractor );
+      itkSetObjectMacro( MPRViewer, SimpleMPRWidget );
 
     public:
-      virtual const Parameters& GetDefaultParameters( ) const;
-      virtual void SetParameters( const Parameters& params );
+      virtual void SetITK( itk::LightObject* o );
+      virtual void SetVTK( vtkObjectBase* o );
 
-      virtual unsigned int GetNumberOfInputs( ) const;
-      virtual unsigned int GetNumberOfOutputs( ) const;
+      // IO management
+      std::set< std::string > GetInputsNames( ) const;
+      std::set< std::string > GetOutputsNames( ) const;
+      unsigned int GetNumberOfInputs( ) const;
+      unsigned int GetNumberOfOutputs( ) const;
 
-      virtual void SetNumberOfInputs( unsigned int n );
-      virtual void SetNumberOfOutputs( unsigned int n );
+      OutputProcessObjectPort& GetOutput( const std::string& id );
+      const OutputProcessObjectPort& GetOutput( const std::string& id ) const;
 
-      virtual void SetInput( unsigned int idx, DataObject* dobj );
-      virtual DataObject* GetOutput( unsigned int idx );
+      template< class T >
+        inline T* GetInputData( const std::string& id );
+      template< class T >
+        inline const T* GetInputData( const std::string& id ) const;
+      template< class T >
+        inline T* GetOutputData( const std::string& id );
+      template< class T >
+        inline const T* GetOutputData( const std::string& id ) const;
 
+      bool SetInput(
+        const std::string& id, const OutputProcessObjectPort& port
+        );
+
+      void DisconnectInputs( );
+      void DisconnectOutputs( );
+      void Disconnect( );
+
+      // Pipeline execution
+      virtual itk::ModifiedTimeType GetMTime( ) const;
       virtual std::string Update( );
-      virtual void DisconnectOutputs( );
 
     protected:
       ProcessObject( );
       virtual ~ProcessObject( );
 
+      void _AddInput( const std::string& name, bool required = true );
       template< class O >
-        inline void _MakeOutput( unsigned int idx );
-
-      template< class T >
-        inline T* _Input( unsigned int idx );
-
-      template< class T >
-        inline const T* _Input( unsigned int idx ) const;
-
-      template< class T >
-        inline T* _Output( unsigned int idx );
-
-      template< class T >
-        inline const T* _Output( unsigned int idx ) const;
+        inline void _AddOutput( const std::string& name );
+      template< class F >
+        inline F* _CreateITK( );
+      template< class F >
+        inline F* _CreateVTK( );
 
       virtual std::string _GenerateData( ) = 0;
 
@@ -70,12 +108,17 @@ namespace cpPlugins
       Self& operator=( const Self& );
 
     protected:
-      itk::ProcessObject::Pointer m_RealProcessObject;
-      Parameters m_DefaultParameters;
-      Parameters m_Parameters;
+      typedef std::map< std::string, InputProcessObjectPort >  _TInputs;
+      typedef std::map< std::string, OutputProcessObjectPort > _TOutputs;
+      _TInputs  m_Inputs;
+      _TOutputs m_Outputs;
+      Parameters::Pointer m_Parameters;
+
+      itk::ModifiedTimeType m_LastExecutionTime;
 
-      std::vector< DataObject::Pointer > m_Inputs;
-      std::vector< DataObject::Pointer > m_Outputs;
+      ParametersQtDialog*        m_ParametersDialog;
+      vtkRenderWindowInteractor* m_SingleInteractor;
+      SimpleMPRWidget*           m_MPRViewer;
     };
 
   } // ecapseman
@@ -84,566 +127,6 @@ namespace cpPlugins
 
 #include <cpPlugins/Interface/ProcessObject.hxx>
 
-
-// -------------------------------------------------------------------------
-/* TODO
-   #define cpPlugins_Image_Demangle_Methods( c )                           \
-   std::string _DemangleImageDimension( itk::DataObject* o );            \
-   std::string _DemangleImagePixel( unsigned int d, itk::DataObject* o );
-
-   // -------------------------------------------------------------------------
-   #define cpPlugins_Image_Demangle_Methods_Code( c, f )                   \
-   std::string c::_DemangleImageDimension( itk::DataObject* o )          \
-   {                                                                     \
-   std::string r = "";                                                 \
-   if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL )             \
-   {                                                                   \
-   cpPlugins_Image_Array_Demangle(                                   \
-   itk::Vector, float, 1, 1, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Vector, double, 1, 1, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, float, 1, 1, o, f, r                                \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, double, 1, 1, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, float, 1, 1, o, f, r                      \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, double, 1, 1, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, float, 1, 1, o, f, r            \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, double, 1, 1, o, f, r           \
-   );                                                              \
-   else r = this->_DemangleImagePixel( 1, o );                       \
-   }                                                                   \
-   else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL )        \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   itk::RGBPixel< char >, 2, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< short >, 2, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< unsigned char >, 2, o, f, r                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< unsigned short >, 2, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< char >, 2, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< short >, 2, o, f, r                             \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< unsigned char >, 2, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< unsigned short >, 2, o, f, r                    \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Vector, float, 2, 2, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Vector, double, 2, 2, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, float, 2, 2, o, f, r                                \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, double, 2, 2, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, float, 2, 2, o, f, r                      \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, double, 2, 2, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, float, 2, 2, o, f, r            \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, double, 2, 2, o, f, r           \
-   );                                                              \
-   else r = this->_DemangleImagePixel( 2, o );                       \
-   }                                                                   \
-   else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL )        \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   itk::RGBPixel< char >, 3, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< short >, 3, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< unsigned char >, 3, o, f, r                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< unsigned short >, 3, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< char >, 3, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< short >, 3, o, f, r                             \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< unsigned char >, 3, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< unsigned short >, 3, o, f, r                    \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Vector, float, 3, 3, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Vector, double, 3, 3, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, float, 3, 3, o, f, r                                \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, double, 3, 3, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, float, 3, 3, o, f, r                      \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, double, 3, 3, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, float, 3, 3, o, f, r            \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, double, 3, 3, o, f, r           \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::DiffusionTensor3D< float >, 3, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::DiffusionTensor3D< double >, 3, o, f, r                    \
-   );                                                              \
-   else r = this->_DemangleImagePixel( 3, o );                       \
-   }                                                                   \
-   else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL )        \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   itk::RGBPixel< char >, 4, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< short >, 4, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< unsigned char >, 4, o, f, r                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBPixel< unsigned short >, 4, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< char >, 4, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< short >, 4, o, f, r                             \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< unsigned char >, 4, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::RGBAPixel< unsigned short >, 4, o, f, r                    \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Vector, float, 4, 4, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Vector, double, 4, 4, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, float, 4, 4, o, f, r                                \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::Point, double, 4, 4, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, float, 4, 4, o, f, r                      \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::CovariantVector, double, 4, 4, o, f, r                     \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, float, 4, 4, o, f, r            \
-   );                                                              \
-   else cpPlugins_Image_Array_Demangle(                              \
-   itk::SymmetricSecondRankTensor, double, 4, 4, o, f, r           \
-   );                                                              \
-   else r = this->_DemangleImagePixel( 4, o );                       \
-   }                                                                   \
-   else                                                                \
-   r =                                                               \
-   std::string( #c ) +                                             \
-   std::string( ": Image dimension not supported." );              \
-   return( r );                                                        \
-   }                                                                     \
-   std::string c::_DemangleImagePixel(                                   \
-   unsigned int d, itk::DataObject* o                                  \
-   )                                                                   \
-   {                                                                     \
-   std::string r = "";                                                 \
-   if( d == 1 )                                                        \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 1, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 1, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 1, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 1, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 1, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 1, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 1, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 1, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 1, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 1, o, f, r                                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< float >, 1, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< double >, 1, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::Offset< 1 >, 1, o, f, r                                    \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else if( d == 2 )                                                   \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 2, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 2, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 2, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 2, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 2, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 2, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 2, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 2, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 2, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 2, o, f, r                                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< float >, 2, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< double >, 2, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::Offset< 2 >, 2, o, f, r                                    \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else if( d == 3 )                                                   \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 3, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 3, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 3, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 3, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 3, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 3, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 3, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 3, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 3, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 3, o, f, r                                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< float >, 3, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< double >, 3, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::Offset< 3 >, 3, o, f, r                                    \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else if( d == 4 )                                                   \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 4, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 4, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 4, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 4, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 4, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 4, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 4, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 4, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 4, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 4, o, f, r                                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< float >, 4, o, f, r                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   std::complex< double >, 4, o, f, r                              \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   itk::Offset< 4 >, 4, o, f, r                                    \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else                                                                \
-   r =                                                               \
-   std::string( #c ) +                                             \
-   std::string( ": Image dimension not supported." );              \
-   return( r );                                                        \
-   }
-
-   // -------------------------------------------------------------------------
-   #define cpPlugins_Image_Demangle_Methods_Code_Only_Scalars( c, f )      \
-   std::string c::_DemangleImageDimension( itk::DataObject* o )          \
-   {                                                                     \
-   std::string r = "";                                                 \
-   if( dynamic_cast< itk::ImageBase< 1 >* >( o ) != NULL )             \
-   r = this->_DemangleImagePixel( 1, o );                            \
-   else if( dynamic_cast< itk::ImageBase< 2 >* >( o ) != NULL )        \
-   r = this->_DemangleImagePixel( 2, o );                            \
-   else if( dynamic_cast< itk::ImageBase< 3 >* >( o ) != NULL )        \
-   r = this->_DemangleImagePixel( 3, o );                            \
-   else if( dynamic_cast< itk::ImageBase< 4 >* >( o ) != NULL )        \
-   r = this->_DemangleImagePixel( 4, o );                            \
-   else                                                                \
-   r =                                                               \
-   std::string( #c ) +                                             \
-   std::string( ": Image dimension not supported." );              \
-   return( r );                                                        \
-   }                                                                     \
-   std::string c::_DemangleImagePixel(                                   \
-   unsigned int d, itk::DataObject* o                                  \
-   )                                                                   \
-   {                                                                     \
-   std::string r = "";                                                 \
-   if( d == 1 )                                                        \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 1, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 1, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 1, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 1, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 1, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 1, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 1, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 1, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 1, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 1, o, f, r                                              \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else if( d == 2 )                                                   \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 2, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 2, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 2, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 2, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 2, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 2, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 2, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 2, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 2, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 2, o, f, r                                              \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else if( d == 3 )                                                   \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 3, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 3, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 3, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 3, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 3, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 3, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 3, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 3, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 3, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 3, o, f, r                                              \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else if( d == 4 )                                                   \
-   {                                                                   \
-   cpPlugins_Image_Demangle(                                         \
-   char, 4, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   short, 4, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   int, 4, o, f, r                                                 \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   long, 4, o, f, r                                                \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned char, 4, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned short, 4, o, f, r                                      \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned int, 4, o, f, r                                        \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   unsigned long, 4, o, f, r                                       \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   float, 4, o, f, r                                               \
-   );                                                              \
-   else cpPlugins_Image_Demangle(                                    \
-   double, 4, o, f, r                                              \
-   );                                                              \
-   else r = std::string( #c ) + std::string( ": Image type." );      \
-   }                                                                   \
-   else                                                                \
-   r =                                                               \
-   std::string( #c ) +                                             \
-   std::string( ": Image dimension not supported." );              \
-   return( r );                                                        \
-   }
-*/
-
 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
 
 // eof - $RCSfile$