]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/Common/Image/SkeletonReader.h
...
[FrontAlgorithms.git] / lib / fpa / Common / Image / SkeletonReader.h
diff --git a/lib/fpa/Common/Image/SkeletonReader.h b/lib/fpa/Common/Image/SkeletonReader.h
new file mode 100644 (file)
index 0000000..cc64aae
--- /dev/null
@@ -0,0 +1,85 @@
+// =========================================================================
+// @author Leonardo Florez Valencia
+// @email florez-l@javeriana.edu.co
+// =========================================================================
+#ifndef __fpa__Common__Image__SkeletonReader__h__
+#define __fpa__Common__Image__SkeletonReader__h__
+
+#include <itkProcessObject.h>
+
+namespace fpa
+{
+  namespace Common
+  {
+    namespace Image
+    {
+      /**
+       */
+      template< class _TSkeleton >
+      class SkeletonReader
+        : public itk::ProcessObject
+      {
+      public:
+        // Basic types
+        typedef SkeletonReader                  Self;
+        typedef itk::ProcessObject              Superclass;
+        typedef itk::SmartPointer< Self >       Pointer;
+        typedef itk::SmartPointer< const Self > ConstPointer;
+
+        typedef _TSkeleton TSkeleton;
+
+      public:
+        itkNewMacro( Self );
+        itkTypeMacro( SkeletonReader, itk::ProcessObject );
+
+        itkGetConstMacro( FileName, std::string );
+        itkSetMacro( FileName, std::string );
+
+      public:
+        TSkeleton* GetOutput( );
+        TSkeleton* GetOutput( unsigned int i );
+
+        virtual void GraftOutput( itk::DataObject* out );
+        virtual void GraftOutput(
+          const typename Superclass::DataObjectIdentifierType& key,
+          itk::DataObject* out
+          );
+        virtual void GraftNthOutput( unsigned int i, itk::DataObject* out );
+        virtual itk::DataObject::Pointer MakeOutput(
+          itk::ProcessObject::DataObjectPointerArraySizeType i
+          ) override;
+
+        virtual void Update( ) override
+          { this->GenerateData( ); }
+
+      protected:
+        SkeletonReader( );
+        virtual ~SkeletonReader( );
+
+        virtual void GenerateData( ) override;
+
+        // Do nothing
+        virtual void GenerateOutputInformation( ) override
+          { }
+
+      private:
+        // Purposely not implemented
+        SkeletonReader( const Self& );
+        void operator=( const Self& );
+
+      protected:
+        std::string m_FileName;
+      };
+
+    } // ecapseman
+
+  } // ecapseman
+
+} // ecapseman
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#  include <fpa/Common/Image/SkeletonReader.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+#endif // __fpa__Common__Image__SkeletonReader__h__
+
+// eof - $RCSfile$