KWStyle - itkImageDuplicator.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkImageDuplicator.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:37 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkImageDuplicator_h
18 #define __itkImageDuplicator_h
19
20 #include "itkObject.h"
21 #include "itkImage.h"
22
23 namespace itk
24 {
25
26 /** This helper class create an image which is perfect copy of the input image
27  */
28 template <class TInputImage>            
29 MCM class ITK_EXPORT ImageDuplicator : public Object 
30 {
31 public:
32   /** Standard class typedefs. */
33   typedef ImageDuplicator Self;
34 TDA   typedef Object  Superclass;
35 TDA   typedef SmartPointer<Self>   Pointer;
36 TDA   typedef SmartPointer<const Self>  ConstPointer;
37
38   /** Method for creation through the object factory. */
39   itkNewMacro(Self);
40
41   /** Run-time type information (and related methods). */
42   itkTypeMacro(ImageDuplicator, Object);
43
44   /** Type definitions for the input image. */
45   typedef TInputImage  ImageType;
46 TDA   typedef typename TInputImage::Pointer  ImagePointer;
47 TDA   typedef typename TInputImage::ConstPointer ImageConstPointer;
48 TDA   typedef typename TInputImage::PixelType PixelType;
49 TDA   typedef typename TInputImage::IndexType IndexType;
50
51   itkStaticConstMacro(ImageDimension, unsigned int,
52                       ImageType::ImageDimension);
53
54   /** Set the input image. */
55   itkSetConstObjectMacro(InputImage,ImageType);
56   
57   /** Get the output image. */
58   itkGetObjectMacro(Output,ImageType);
59
60   /** Compute of the input image. */
61   void Update(void);
62
63 protected:
64   ImageDuplicator();
65   virtual ~ImageDuplicator() {};
66   void PrintSelf(std::ostream& os, Indent indent) const;
67
68 private:
69   ImageDuplicator(const Self&); //purposely not implemented
70   void operator=(const Self&); //purposely not implemented
71   
72   ImageConstPointer       m_InputImage;
73   ImagePointer            m_Output;
74   unsigned long           m_InternalImageTime;
75   
76 };
77
78 // end namespace itk
79
80
81 #ifndef ITK_MANUAL_INSTANTIATION
82 #include "itkImageDuplicator.txx"
83 #endif
84
85 #endif /* __itkImageDuplicator_h */
86

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:13PM
© Kitware Inc.