00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPolylineMask2DImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/08/05 15:09:35 $ 00007 Version: $Revision: 1.2 $ 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 _itkPolylineMask2DImageFilter_h 00018 #define _itkPolylineMask2DImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkImageRegionIteratorWithIndex.h" 00022 00023 namespace itk 00024 { 00025 00035 template <class TInputImage, class TPolyline, 00036 class TOutputImage> 00037 class ITK_EXPORT PolylineMask2DImageFilter:public ImageToImageFilter<TInputImage, TOutputImage> 00038 { 00039 public: 00041 typedef PolylineMask2DImageFilter Self; 00042 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass; 00043 typedef SmartPointer<Self> Pointer; 00044 typedef SmartPointer<const Self> ConstPointer; 00045 00047 itkNewMacro(Self); 00048 00050 itkTypeMacro( PolylineMask2DImageFilter, ImageToImageFilter ); 00051 00053 itkStaticConstMacro(NDimensions, unsigned int, 00054 TInputImage::ImageDimension); 00055 00057 typedef TInputImage InputImageType; 00058 typedef typename InputImageType::ConstPointer InputImagePointer; 00059 typedef typename InputImageType::RegionType InputImageRegionType; 00060 typedef typename InputImageType::PixelType InputImagePixelType; 00061 00062 /* typedef for the polyline type */ 00063 typedef TPolyline PolylineType; 00064 00065 /* typedef for the output image */ 00066 typedef TOutputImage OutputImageType; 00067 typedef typename OutputImageType::Pointer OutputImagePointer; 00068 typedef typename OutputImageType::RegionType OutputImageRegionType; 00069 typedef typename OutputImageType::PixelType OutputImagePixelType; 00070 00072 void SetInput1( const InputImageType * image); 00073 void SetInput2( const PolylineType * polyline); 00074 00075 /* Generate Data */ 00076 void GenerateData(void); 00077 00078 00079 protected: 00080 PolylineMask2DImageFilter(); 00081 virtual ~PolylineMask2DImageFilter() {}; 00082 void PrintSelf(std::ostream& os, Indent indent) const; 00083 00084 private: 00085 PolylineMask2DImageFilter(const Self&); //purposely not implemented 00086 void operator=(const Self&); //purposely not implemented 00087 00088 }; 00089 00090 } // end namespace itk 00091 00092 #ifndef ITK_MANUAL_INSTANTIATION 00093 #include "itkPolylineMask2DImageFilter.txx" 00094 #endif 00095 00096 #endif