00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkExtractOrthogonalSwath2DImageFilter_h
00018 #define __itkExtractOrthogonalSwath2DImageFilter_h
00019
00020 #include "itkImageAndPathToImageFilter.h"
00021 #include "itkParametricPath.h"
00022
00023 namespace itk
00024 {
00025
00040 template <class TImage>
00041 class ITK_EXPORT ExtractOrthogonalSwath2DImageFilter : public
00042 ImageAndPathToImageFilter<TImage,ParametricPath<2>,TImage>
00043 {
00044 public:
00046 typedef ExtractOrthogonalSwath2DImageFilter Self;
00047 typedef ImageAndPathToImageFilter<TImage,ParametricPath<2>,TImage> Superclass;
00048 typedef SmartPointer<Self> Pointer;
00049 typedef SmartPointer<const Self> ConstPointer;
00050
00052 itkNewMacro(Self);
00053
00055 itkTypeMacro(ExtractOrthogonalSwath2DImageFilter, ImageAndPathToImageFilter);
00056
00058 typedef TImage ImageType;
00059 typedef typename ImageType::Pointer ImagePointer;
00060 typedef typename ImageType::ConstPointer ImageConstPointer;
00061 typedef typename ImageType::RegionType ImageRegionType;
00062 typedef typename ImageType::IndexType ImageIndexType;
00063 typedef typename ImageType::PixelType ImagePixelType;
00064 typedef ParametricPath<2> PathType;
00065 typedef typename PathType::ConstPointer PathConstPointer;
00066 typedef typename PathType::InputType PathInputType;
00067 typedef typename PathType::OutputType PathOutputType;
00068 typedef typename PathType::IndexType PathIndexType;
00069 typedef typename PathType::ContinuousIndexType PathContinuousIndexType;
00070 typedef typename PathType::OffsetType PathOffsetType;
00071 typedef typename PathType::VectorType PathVectorType;
00072 typedef typename ImageType::SizeType SizeType;
00073
00074
00076 itkStaticConstMacro(PathDimension, unsigned int,
00077 2);
00078 itkStaticConstMacro(ImageDimension, unsigned int,
00079 TImage::ImageDimension);
00080
00087 virtual void SetSpacing(const double* spacing);
00088 virtual void SetSpacing(const float* spacing);
00089 virtual const double* GetSpacing() const;
00090
00095 virtual void SetOrigin(const double* origin);
00096 virtual void SetOrigin(const float* origin);
00097 virtual const double * GetOrigin() const;
00098
00100 itkSetMacro( Size, SizeType )
00101
00102
00104 itkSetMacro( DefaultPixelValue, ImagePixelType )
00105
00106
00107
00108
00109
00110 virtual void EnlargeOutputRequestedRegion(DataObject *output)
00111 {
00112 output->SetRequestedRegionToLargestPossibleRegion();
00113 }
00114
00115
00116
00117
00118 protected:
00119 ExtractOrthogonalSwath2DImageFilter()
00120 {
00121 m_DefaultPixelValue = NumericTraits<ImagePixelType>::Zero;
00122 m_Size[0] = 512;
00123 m_Size[1] = 16*2+1;
00124 m_Origin[0] = m_Origin[1] = 0.0;
00125 m_Spacing[0] = m_Spacing[1] = 1.0;
00126 };
00127 virtual ~ExtractOrthogonalSwath2DImageFilter() {};
00128 void PrintSelf(std::ostream& os, Indent indent) const;
00129
00130
00131
00132
00134 virtual void GenerateOutputInformation(void);
00135
00137 virtual void GenerateInputRequestedRegion()
00138 {
00139 Superclass::GenerateInputRequestedRegion();
00140 ( const_cast< ImageType * > (this->GetImageInput()) ) ->
00141 SetRequestedRegionToLargestPossibleRegion();
00142 ( const_cast< PathType * > (this->GetPathInput()) ) ->
00143 SetRequestedRegionToLargestPossibleRegion();
00144 }
00145
00146 virtual void GenerateData(void);
00147
00148
00149
00150
00151 private:
00152 ExtractOrthogonalSwath2DImageFilter(const Self&);
00153 void operator=(const Self&);
00154
00155 ImagePixelType m_DefaultPixelValue;
00156 SizeType m_Size;
00157 double m_Origin[ImageDimension];
00158 double m_Spacing[ImageDimension];
00159 };
00160
00161 }
00162
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkExtractOrthogonalSwath2DImageFilter.txx"
00165 #endif
00166
00167 #endif