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

itkImageSource.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkImageSource.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/12/04 17:30:20 $ 00007 Version: $Revision: 1.49 $ 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 Portions of this code are covered under the VTK copyright. 00013 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. 00014 00015 This software is distributed WITHOUT ANY WARRANTY; without even 00016 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00017 PURPOSE. See the above copyright notices for more information. 00018 00019 =========================================================================*/ 00020 #ifndef __itkImageSource_h 00021 #define __itkImageSource_h 00022 00023 #include "itkProcessObject.h" 00024 #include "itkImage.h" 00025 00026 namespace itk 00027 { 00028 00040 template <class TOutputImage> 00041 class ITK_EXPORT ImageSource : public ProcessObject 00042 { 00043 public: 00045 typedef ImageSource Self; 00046 typedef ProcessObject Superclass; 00047 typedef SmartPointer<Self> Pointer; 00048 typedef SmartPointer<const Self> ConstPointer; 00049 00051 typedef DataObject::Pointer DataObjectPointer; 00052 00054 itkTypeMacro(ImageSource,ProcessObject); 00055 00057 typedef TOutputImage OutputImageType; 00058 typedef typename OutputImageType::Pointer OutputImagePointer; 00059 typedef typename OutputImageType::RegionType OutputImageRegionType; 00060 typedef typename OutputImageType::PixelType OutputImagePixelType; 00061 00102 OutputImageType * GetOutput(void); 00103 OutputImageType * GetOutput(unsigned int idx); 00104 00140 virtual void GraftOutput(OutputImageType *output); 00141 00148 virtual void GraftNthOutput(unsigned int idx, OutputImageType *output); 00149 00163 virtual DataObjectPointer MakeOutput(unsigned int idx); 00164 00165 protected: 00166 ImageSource(); 00167 virtual ~ImageSource() {} 00168 00184 virtual void GenerateData(); 00185 00208 virtual 00209 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, 00210 int threadId ); 00211 00212 00218 virtual void PrepareOutputs() {}; 00219 00225 virtual void AllocateOutputs(); 00226 00237 virtual void BeforeThreadedGenerateData() {}; 00238 00249 virtual void AfterThreadedGenerateData() {}; 00250 00256 virtual 00257 int SplitRequestedRegion(int i, int num, OutputImageRegionType& splitRegion); 00258 00262 static ITK_THREAD_RETURN_TYPE ThreaderCallback( void *arg ); 00263 00265 struct ThreadStruct 00266 { 00267 Pointer Filter; 00268 }; 00269 00270 private: 00271 ImageSource(const Self&); //purposely not implemented 00272 void operator=(const Self&); //purposely not implemented 00273 00274 }; 00275 #ifdef ITK_EXPLICIT_INSTANTIATION 00276 extern template class ImageSource<Image<float ,2> >; 00277 extern template class ImageSource<Image<double ,2> >; 00278 extern template class ImageSource<Image<unsigned char ,2> >; 00279 extern template class ImageSource<Image<unsigned short,2> >; 00280 extern template class ImageSource<Image<unsigned int ,2> >; 00281 extern template class ImageSource<Image<signed char ,2> >; 00282 extern template class ImageSource<Image<signed short ,2> >; 00283 extern template class ImageSource<Image<signed int ,2> >; 00284 extern template class ImageSource<Image<float ,3> >; 00285 extern template class ImageSource<Image<double ,3> >; 00286 extern template class ImageSource<Image<unsigned char ,3> >; 00287 extern template class ImageSource<Image<unsigned short,3> >; 00288 extern template class ImageSource<Image<unsigned int ,3> >; 00289 extern template class ImageSource<Image<signed char ,3> >; 00290 extern template class ImageSource<Image<signed short ,3> >; 00291 extern template class ImageSource<Image<signed int ,3> >; 00292 #endif 00293 00294 } // end namespace itk 00295 00296 #ifndef ITK_MANUAL_INSTANTIATION 00297 #include "itkImageSource.txx" 00298 #endif 00299 00300 #endif 00301

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