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

itkImageSeriesWriter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageSeriesWriter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:35 $ 00007 Version: $Revision: 1.5 $ 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 __itkImageSeriesWriter_h 00018 #define __itkImageSeriesWriter_h 00019 00020 #include "itkProcessObject.h" 00021 #include "itkImageIOBase.h" 00022 #include "itkFileIteratorBase.h" 00023 #include "itkExceptionObject.h" 00024 #include "itkSize.h" 00025 #include "itkImageRegion.h" 00026 00027 namespace itk 00028 { 00029 00031 class ImageSeriesWriterException : public ExceptionObject 00032 { 00033 public: 00035 itkTypeMacro( ImageSeriesWriterException, ExceptionObject ); 00036 00038 ImageSeriesWriterException(char *file, unsigned int line, 00039 const char* message = "Error in IO") : 00040 ExceptionObject(file, line) 00041 { 00042 SetDescription(message); 00043 } 00044 00046 ImageSeriesWriterException(const std::string &file, unsigned int line, 00047 const char* message = "Error in IO") : 00048 ExceptionObject(file, line) 00049 { 00050 SetDescription(message); 00051 } 00052 }; 00053 00054 00085 template <class TInputImage> 00086 class ITK_EXPORT ImageSeriesWriter : public ProcessObject 00087 { 00088 public: 00090 typedef ImageSeriesWriter Self; 00091 typedef ProcessObject Superclass; 00092 typedef SmartPointer<Self> Pointer; 00093 typedef SmartPointer<const Self> ConstPointer; 00094 00096 itkNewMacro(Self); 00097 00099 itkTypeMacro(ImageSeriesWriter,ProcessObject); 00100 00102 typedef TInputImage InputImageType; 00103 typedef typename InputImageType::Pointer InputImagePointer; 00104 typedef typename InputImageType::RegionType InputImageRegionType; 00105 typedef typename InputImageType::PixelType InputImagePixelType; 00106 00108 void SetInput(const InputImageType *input); 00109 const InputImageType *GetInput(void); 00110 const InputImageType *GetInput(unsigned int idx); 00111 00114 itkSetObjectMacro(FileIterator,FileIteratorBase); 00115 itkGetObjectMacro(FileIterator,FileIteratorBase); 00116 00123 itkSetObjectMacro(ImageIO,ImageIOBase); 00124 itkGetObjectMacro(ImageIO,ImageIOBase); 00125 00133 virtual void Write(void); 00134 00137 virtual void Update() 00138 {this->Write();} 00139 00140 protected: 00141 ImageSeriesWriter(); 00142 ~ImageSeriesWriter(); 00143 void PrintSelf(std::ostream& os, Indent indent) const; 00144 00146 void GenerateData(void); 00147 00149 FileIteratorBase::Pointer m_FileIterator; 00150 00151 ImageIOBase::Pointer m_ImageIO; 00152 bool m_UserSpecifiedImageIO; //track whether the ImageIO is user specified 00153 00154 ImageIORegion m_IORegion; 00155 bool m_UserSpecifiedIORegion; //track whether the region is user specified 00156 00161 void SetIORegion(const ImageIORegion & region); 00162 const ImageIORegion & GetIORegion() const; 00163 00164 private: 00165 ImageSeriesWriter(const Self&); //purposely not implemented 00166 void operator=(const Self&); //purposely not implemented 00167 00168 }; 00169 00170 00171 } // end namespace itk 00172 00173 #ifndef ITK_MANUAL_INSTANTIATION 00174 #include "itkImageSeriesWriter.txx" 00175 #endif 00176 00177 #endif // __itkImageSeriesWriter_h 00178

Generated at Sat Mar 31 02:22:34 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000