ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkExtractOrthogonalSwath2DImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkExtractOrthogonalSwath2DImageFilter_h
19 #define itkExtractOrthogonalSwath2DImageFilter_h
20 
22 #include "itkParametricPath.h"
23 
24 namespace itk
25 {
41 template< typename TImage >
43  ImageAndPathToImageFilter< TImage, ParametricPath< 2 >, TImage >
44 {
45 public:
52 
54  itkNewMacro(Self);
55 
58 
60  typedef TImage ImageType;
61  typedef typename ImageType::Pointer ImagePointer;
62  typedef typename ImageType::ConstPointer ImageConstPointer;
63  typedef typename ImageType::RegionType ImageRegionType;
64  typedef typename ImageType::IndexType ImageIndexType;
65  typedef typename ImageType::PixelType ImagePixelType;
74  typedef typename ImageType::SizeType SizeType;
75 
77  itkStaticConstMacro(PathDimension, unsigned int,
78  2);
79  itkStaticConstMacro(ImageDimension, unsigned int,
80  TImage::ImageDimension);
82 
89  virtual void SetSpacing(const double *spacing);
90 
91  virtual void SetSpacing(const float *spacing);
92 
93  virtual const double * GetSpacing() const;
94 
99  virtual void SetOrigin(const double *origin);
100 
101  virtual void SetOrigin(const float *origin);
102 
103  virtual const double * GetOrigin() const;
104 
107  itkSetMacro(Size, SizeType)
108 
109 
111  itkSetMacro(DefaultPixelValue, ImagePixelType)
112 
113  //--------------------------------------------------------------------------
114  //
115 
117  virtual void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE
118  {
119  output->SetRequestedRegionToLargestPossibleRegion();
120  }
121 
122  //
123  //--------------------------------------------------------------------------
124 
125 protected:
127  {
129  m_Size[0] = 512;
130  m_Size[1] = 16 * 2 + 1; // must be odd
131  m_Origin[0] = m_Origin[1] = 0.0;
132  m_Spacing[0] = m_Spacing[1] = 1.0;
133  }
134 
136  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
137 
138  //--------------------------------------------------------------------------
139  //
140 
142  virtual void GenerateOutputInformation(void) ITK_OVERRIDE;
143 
145  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE
146  {
148  this->GetNonConstImageInput()->SetRequestedRegionToLargestPossibleRegion();
150  }
152 
153  virtual void GenerateData(void) ITK_OVERRIDE;
154 
155  //
156  //--------------------------------------------------------------------------
157 
158 private:
159  ExtractOrthogonalSwath2DImageFilter(const Self &); //purposely not implemented
160  void operator=(const Self &); //purposely not implemented
161 
165  double m_Spacing[ImageDimension];
166 };
167 } // end namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 #include "itkExtractOrthogonalSwath2DImageFilter.hxx"
171 #endif
172 
173 #endif
virtual const double * GetSpacing() const
Light weight base class for most itk classes.
virtual void SetOrigin(const double *origin)
virtual void SetSpacing(const double *spacing)
Superclass::OutputType OutputType
Represent the size (bounds) of a n-dimensional image.
Definition: itkSize.h:52
Superclass::InputType InputType
virtual void GenerateOutputInformation(void) override
Base class for filters that take both a path and an image as input and produce a path as output...
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void GenerateInputRequestedRegion() override
ImageAndPathToImageFilter< TImage, ParametricPath< 2 >, TImage > Superclass
virtual void GenerateData(void) override
A templated class holding a point in n-Dimensional image space.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Extracts into rectangular form a &quot;swath&quot; image from the input image along the parametric path...
virtual void SetRequestedRegionToLargestPossibleRegion()
Base class for all data objects in ITK.
virtual void EnlargeOutputRequestedRegion(DataObject *output) override
virtual const double * GetOrigin() const