ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkImageDuplicator_h 00019 #define __itkImageDuplicator_h 00020 00021 #include "itkObject.h" 00022 #include "itkImage.h" 00023 00024 namespace itk 00025 { 00053 template< class TInputImage > 00054 class ITK_EXPORT ImageDuplicator:public Object 00055 { 00056 public: 00058 typedef ImageDuplicator Self; 00059 typedef Object Superclass; 00060 typedef SmartPointer< Self > Pointer; 00061 typedef SmartPointer< const Self > ConstPointer; 00062 00064 itkNewMacro(Self); 00065 00067 itkTypeMacro(ImageDuplicator, Object); 00068 00070 typedef TInputImage ImageType; 00071 typedef typename TInputImage::Pointer ImagePointer; 00072 typedef typename TInputImage::ConstPointer ImageConstPointer; 00073 typedef typename TInputImage::PixelType PixelType; 00074 typedef typename TInputImage::IndexType IndexType; 00075 00076 itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension); 00077 00079 itkSetConstObjectMacro(InputImage, ImageType); 00080 00082 itkGetObjectMacro(Output, ImageType); 00083 00085 void Update(void); 00086 00087 protected: 00088 ImageDuplicator(); 00089 virtual ~ImageDuplicator() {} 00090 void PrintSelf(std::ostream & os, Indent indent) const; 00091 00092 private: 00093 ImageDuplicator(const Self &); //purposely not implemented 00094 void operator=(const Self &); //purposely not implemented 00095 00096 ImageConstPointer m_InputImage; 00097 ImagePointer m_Output; 00098 unsigned long m_InternalImageTime; 00099 }; 00100 } // end namespace itk 00101 00102 // Define instantiation macro for this template. 00103 #define ITK_TEMPLATE_ImageDuplicator(_, EXPORT, TypeX, TypeY) \ 00104 namespace itk \ 00105 { \ 00106 _( 1 ( class EXPORT ImageDuplicator< ITK_TEMPLATE_1 TypeX > ) ) \ 00107 namespace Templates \ 00108 { \ 00109 typedef ImageDuplicator< ITK_TEMPLATE_1 TypeX > ImageDuplicator##TypeY; \ 00110 } \ 00111 } 00112 00113 #if ITK_TEMPLATE_EXPLICIT 00114 #include "Templates/itkImageDuplicator+-.h" 00115 #endif 00116 00117 #if ITK_TEMPLATE_TXX 00118 #include "itkImageDuplicator.hxx" 00119 #endif 00120 00121 #endif /* __itkImageDuplicator_h */ 00122