]> Creatis software - clitk.git/commitdiff
Add a clitk version of itkPasteImageFilter because, with itkv4, there is a new Verify...
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Thu, 28 Jul 2011 09:42:48 +0000 (11:42 +0200)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Thu, 28 Jul 2011 09:42:48 +0000 (11:42 +0200)
itk/clitkPasteImageFilter.h [new file with mode: 0644]
itk/clitkPasteImageFilter.hxx [new file with mode: 0644]

diff --git a/itk/clitkPasteImageFilter.h b/itk/clitkPasteImageFilter.h
new file mode 100644 (file)
index 0000000..72550cf
--- /dev/null
@@ -0,0 +1,49 @@
+/*=========================================================================
+ *
+ *  COPY OF itkPasteImageFilter to remove VerifyInputInformation
+ *
+ *=========================================================================*/
+
+#ifndef __clitkPasteImageFilter_h
+#define __clitkPasteImageFilter_h
+
+#include "itkPasteImageFilter.h"
+
+namespace clitk
+{
+  using namespace itk;
+  
+  template< class TInputImage, class TSourceImage = TInputImage, class TOutputImage = TInputImage >
+  class ITK_EXPORT PasteImageFilter:
+    public itk::PasteImageFilter< TInputImage, TSourceImage, TOutputImage >
+  {
+  public:
+    virtual void VerifyInputInformation() { }
+
+    /** Standard class typedefs. */
+    typedef PasteImageFilter                                Self;
+    typedef InPlaceImageFilter< TInputImage, TOutputImage > Superclass;
+    typedef SmartPointer< Self >                            Pointer;
+    typedef SmartPointer< const Self >                      ConstPointer;
+    
+    /** Method for creation through the object factory. */
+    itkNewMacro(Self);
+    
+    /** Run-time type information (and related methods). */
+    itkTypeMacro(PasteImageFilter, InPlaceImageFilter);
+
+  protected:
+    PasteImageFilter();
+    ~PasteImageFilter() {}
+  private:
+    PasteImageFilter(const Self &); //purposely not implemented
+    void operator=(const Self &);   //purposely not implemented
+  };
+} // end namespace itk
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include "clitkPasteImageFilter.hxx"
+#endif
+
+#endif
diff --git a/itk/clitkPasteImageFilter.hxx b/itk/clitkPasteImageFilter.hxx
new file mode 100644 (file)
index 0000000..348d858
--- /dev/null
@@ -0,0 +1,26 @@
+/*=========================================================================
+ *
+ *  COPY OF itkPasteImageFilter to remove VerifyInputInformation
+ *
+ *=========================================================================*/
+
+#ifndef __clitkPasteImageFilter_hxx
+#define __clitkPasteImageFilter_hxx
+
+#include "itkPasteImageFilter.h"
+
+namespace clitk
+{
+  template< class TInputImage, class TSourceImage, class TOutputImage >
+  PasteImageFilter< TInputImage, TSourceImage, TOutputImage >
+  ::PasteImageFilter()
+  {
+    this->ProcessObject::SetNumberOfRequiredInputs(2);
+
+    this->InPlaceOff();
+    this->m_DestinationIndex.Fill(0);
+  }
+
+} // end namespace clitk
+
+#endif