]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/ImageWriter.h
...
[cpPlugins.git] / lib / cpPlugins / Plugins / ImageWriter.h
index c2fc0639ddf0c5ce0f1f90f89d679f5be0ff6a49..4fc04f5a34545eb862e2093c1ad6077d6fa580e3 100644 (file)
@@ -2,8 +2,7 @@
 #define __CPPLUGINS__PLUGINS__IMAGEWRITER__H__
 
 #include <cpPlugins/Plugins/cpPlugins_Export.h>
-#include <cpPlugins/Interface/SinkObject.h>
-#include <itkProcessObject.h>
+#include <cpPlugins/Interface/BaseProcessObjects.h>
 
 namespace cpPlugins
 {
@@ -12,36 +11,35 @@ namespace cpPlugins
     /**
      */
     class cpPlugins_EXPORT ImageWriter
-      : public cpPlugins::Interface::SinkObject
+      : public cpPlugins::Interface::ImageSink
     {
     public:
-      typedef ImageWriter                      Self;
-      typedef cpPlugins::Interface::SinkObject Superclass;
-
-      typedef Superclass::TParameter  TParameter;
-      typedef Superclass::TParameters TParameters;
+      typedef ImageWriter                     Self;
+      typedef cpPlugins::Interface::ImageSink Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
 
     public:
+      itkNewMacro( Self );
+      itkTypeMacro( ImageWriter, cpPluginsInterfaceImageSink );
+
+    protected:
       ImageWriter( );
       virtual ~ImageWriter( );
 
-      virtual std::string GetClassName( ) const;
-
-    protected:
       virtual std::string _GenerateData( );
 
-      template< unsigned int D >
-      std::string _GenerateData0( );
-
-      template< class P, unsigned int D >
-      std::string _GenerateData1( );
+      template< class I >
+        inline std::string _RealGD( itk::DataObject* image );
 
-    protected:
-      itk::ProcessObject::Pointer m_Writer;
+    private:
+      // Purposely not implemented
+      ImageWriter( const Self& );
+      Self& operator=( const Self& );
     };
 
     // ---------------------------------------------------------------------
-    PLUMA_INHERIT_PROVIDER( ImageWriter, cpPlugins::Interface::Object );
+    CPPLUGINS_INHERIT_PROVIDER( ImageWriter );
 
   } // ecapseman