ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkProjectionImageFilter.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 itkProjectionImageFilter_h
19 #define itkProjectionImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
56 template< typename TInputImage, typename TOutputImage, typename TAccumulator >
57 class ITK_TEMPLATE_EXPORT ProjectionImageFilter:
58  public ImageToImageFilter< TInputImage, TOutputImage >
59 {
60 public:
66 
68  itkNewMacro(Self);
69 
72 
74  typedef TInputImage InputImageType;
75  typedef typename InputImageType::Pointer InputImagePointer;
76  typedef typename InputImageType::RegionType InputImageRegionType;
77  typedef typename InputImageType::PixelType InputImagePixelType;
78  typedef TOutputImage OutputImageType;
79  typedef typename OutputImageType::Pointer OutputImagePointer;
80  typedef typename OutputImageType::RegionType OutputImageRegionType;
81  typedef typename OutputImageType::PixelType OutputImagePixelType;
82 
83  typedef TAccumulator AccumulatorType;
84 
86  itkStaticConstMacro(InputImageDimension, unsigned int,
87  TInputImage::ImageDimension);
88  itkStaticConstMacro(OutputImageDimension, unsigned int,
89  TOutputImage::ImageDimension);
91 
94 #ifdef ITK_USE_CONCEPT_CHECKING
95  // Begin concept checking
96  itkConceptMacro( ImageDimensionCheck,
98  itkGetStaticConstMacro(InputImageDimension),
99  itkGetStaticConstMacro(OutputImageDimension) > ) );
100  // End concept checking
101 #endif
102 
105  itkSetMacro(ProjectionDimension, unsigned int);
106  itkGetConstReferenceMacro(ProjectionDimension, unsigned int);
108 
109 protected:
111  virtual ~ProjectionImageFilter() ITK_OVERRIDE {}
112  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
113 
115  virtual void GenerateOutputInformation() ITK_OVERRIDE;
116 
118  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
119 
120  virtual void ThreadedGenerateData(
121  const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE;
122 
123  virtual AccumulatorType NewAccumulator( SizeValueType ) const;
124 
125 private:
126  ITK_DISALLOW_COPY_AND_ASSIGN(ProjectionImageFilter);
127 
128  unsigned int m_ProjectionDimension;
129 };
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "itkProjectionImageFilter.hxx"
134 #endif
135 
136 #endif
Base class for all process objects that output image data.
InputImageType::RegionType InputImageRegionType
unsigned long SizeValueType
Definition: itkIntTypes.h:143
Implements an accumulation of an image along a selected direction.
SmartPointer< const Self > ConstPointer
InputImageType::PixelType InputImagePixelType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for filters that take an image as input and produce an image as output.
OutputImageType::PixelType OutputImagePixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
InputImageType::Pointer InputImagePointer
OutputImageType::RegionType OutputImageRegionType
OutputImageType::Pointer OutputImagePointer