Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkChangeInformationImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkChangeInformationImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/12/11 20:36:50 $ 00007 Version: $Revision: 1.8 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkChangeInformationImageFilter_h 00018 #define __itkChangeInformationImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkFixedArray.h" 00022 00023 namespace itk 00024 { 00025 00046 template <class TInputImage> 00047 class ITK_EXPORT ChangeInformationImageFilter: 00048 public ImageToImageFilter<TInputImage,TInputImage> 00049 { 00050 public: 00052 typedef ChangeInformationImageFilter Self; 00053 typedef ImageToImageFilter<TInputImage,TInputImage> Superclass; 00054 typedef SmartPointer<Self> Pointer; 00055 typedef SmartPointer<const Self> ConstPointer; 00056 00058 itkNewMacro(Self); 00059 00061 typedef typename TInputImage::RegionType OutputImageRegionType; 00062 typedef typename TInputImage::RegionType InputImageRegionType; 00063 00065 typedef typename TInputImage::Pointer InputImagePointer; 00066 00068 typedef typename TInputImage::PixelType OutputImagePixelType; 00069 typedef typename TInputImage::PixelType InputImagePixelType; 00070 00072 typedef typename TInputImage::IndexType OutputImageIndexType; 00073 typedef typename TInputImage::IndexType InputImageIndexType; 00074 typedef typename TInputImage::SizeType OutputImageSizeType; 00075 typedef typename TInputImage::SizeType InputImageSizeType; 00076 typedef typename TInputImage::OffsetType OutputImageOffsetType; 00077 typedef typename TInputImage::OffsetType InputImageOffsetType; 00078 00080 itkStaticConstMacro(ImageDimension, unsigned int, 00081 TInputImage::ImageDimension); 00082 00084 typedef typename TInputImage::SpacingType SpacingType; 00085 typedef typename TInputImage::PointType PointType; 00086 00088 itkTypeMacro(ChangeInformationImageFilter, ImageToImageFilter); 00089 00092 void SetReferenceImage (TInputImage *image) 00093 { 00094 if (image != m_ReferenceImage) 00095 { 00096 m_ReferenceImage = image; 00097 this->ProcessObject::SetNthInput(1, image); 00098 this->Modified(); 00099 } 00100 } 00101 itkGetObjectMacro(ReferenceImage, TInputImage); 00102 00103 itkSetMacro(UseReferenceImage, bool); 00104 itkBooleanMacro(UseReferenceImage); 00105 itkGetMacro(UseReferenceImage, bool); 00106 00110 itkSetMacro(OutputSpacing, SpacingType); 00111 itkGetConstReferenceMacro(OutputSpacing, SpacingType); 00112 00116 itkSetMacro(OutputOrigin, PointType); 00117 itkGetConstReferenceMacro(OutputOrigin, PointType); 00118 00127 itkSetVectorMacro(OutputOffset, long, ImageDimension); 00128 itkGetVectorMacro(OutputOffset, const long, ImageDimension); 00129 00131 void ChangeAll() 00132 { 00133 this->ChangeSpacingOn(); 00134 this->ChangeOriginOn(); 00135 this->ChangeRegionOn(); 00136 } 00137 00140 void ChangeNone() 00141 { 00142 this->ChangeSpacingOff(); 00143 this->ChangeOriginOff(); 00144 this->ChangeRegionOff(); 00145 } 00146 00153 itkSetMacro(ChangeSpacing, bool); 00154 itkBooleanMacro(ChangeSpacing); 00155 itkGetMacro(ChangeSpacing, bool); 00156 00163 itkSetMacro(ChangeOrigin, bool); 00164 itkBooleanMacro(ChangeOrigin); 00165 itkGetMacro(ChangeOrigin, bool); 00166 00169 itkSetMacro(ChangeRegion, bool); 00170 itkBooleanMacro(ChangeRegion); 00171 itkGetMacro(ChangeRegion, bool); 00172 00176 itkSetMacro(CenterImage, bool); 00177 itkBooleanMacro(CenterImage); 00178 itkGetMacro(CenterImage, bool); 00179 00181 virtual void GenerateOutputInformation(); 00182 00184 virtual void GenerateInputRequestedRegion(); 00185 00187 void GenerateData(); 00188 00189 protected: 00190 ChangeInformationImageFilter(); 00191 ~ChangeInformationImageFilter() {}; 00192 void PrintSelf(std::ostream& os, Indent indent) const; 00193 00194 private: 00195 ChangeInformationImageFilter(const Self&); //purposely not implemented 00196 void operator=(const Self&); //purposely not implemented 00197 00198 InputImagePointer m_ReferenceImage; 00199 00200 bool m_CenterImage; 00201 bool m_ChangeSpacing; 00202 bool m_ChangeOrigin; 00203 bool m_ChangeRegion; 00204 bool m_UseReferenceImage; 00205 00206 SpacingType m_OutputSpacing; 00207 PointType m_OutputOrigin; 00208 00209 long m_OutputOffset[ImageDimension]; 00210 OutputImageOffsetType m_Shift; 00211 }; 00212 00213 00214 } // end namespace itk 00215 00216 #ifndef ITK_MANUAL_INSTANTIATION 00217 #include "itkChangeInformationImageFilter.txx" 00218 #endif 00219 00220 #endif

Generated at Sun Apr 1 02:25:52 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000