ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkPointSetToImageFilter.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 itkPointSetToImageFilter_h
19 #define itkPointSetToImageFilter_h
20 
21 #include "itkImageSource.h"
22 #include "itkConceptChecking.h"
23 
24 namespace itk
25 {
33 template< typename TInputPointSet, typename TOutputImage >
34 class ITK_TEMPLATE_EXPORT PointSetToImageFilter:public ImageSource< TOutputImage >
35 {
36 public:
37  ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToImageFilter);
38 
44  using SizeType = typename TOutputImage::SizeType;
45  using OutputImageType = TOutputImage;
46  using OutputImagePointer = typename OutputImageType::Pointer;
47  using ValueType = typename OutputImageType::ValueType;
48 
50  itkNewMacro(Self);
51 
53  itkTypeMacro(PointSetToImageFilter, ImageSource);
54 
56  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
57 
59  using InputPointSetType = TInputPointSet;
60  using InputPointSetPointer = typename InputPointSetType::Pointer;
61  using InputPointSetConstPointer = typename InputPointSetType::ConstPointer;
62 
64  static constexpr unsigned int InputPointSetDimension = InputPointSetType::PointDimension;
65  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
66 
68  using SpacingType = typename TOutputImage::SpacingType;
71 
73  using Superclass::SetInput;
74  virtual void SetInput(const InputPointSetType *pointset);
75 
76  virtual void SetInput(unsigned int, const InputPointSetType *pointset);
77 
78  const InputPointSetType * GetInput();
79 
80  const InputPointSetType * GetInput(unsigned int idx);
81 
86  itkSetMacro(Spacing, SpacingType);
87  virtual void SetSpacing(const double *spacing);
89 
90  virtual void SetSpacing(const float *spacing);
91 
96  itkGetConstReferenceMacro(Spacing, SpacingType);
97 
101  itkSetMacro(Direction, DirectionType);
102  itkGetConstReferenceMacro(Direction, DirectionType);
104 
109  itkSetMacro(Origin, PointType);
110  virtual void SetOrigin(const double *origin);
112 
113  virtual void SetOrigin(const float *origin);
114 
119  itkGetConstReferenceMacro(Origin, PointType);
120 
127  itkSetMacro(InsideValue, ValueType);
128  itkGetConstMacro(InsideValue, ValueType);
130 
137  itkSetMacro(OutsideValue, ValueType);
138  itkGetConstMacro(OutsideValue, ValueType);
140 
142  itkSetMacro(Size, SizeType);
143  itkGetConstMacro(Size, SizeType);
145 
146 protected:
148  ~PointSetToImageFilter() override = default;
149 
150  void GenerateOutputInformation() override {} // do nothing
151  void GenerateData() override;
152 
154 
156 
158 
160 
163 
164  void PrintSelf(std::ostream & os, Indent indent) const override;
165 };
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 #include "itkPointSetToImageFilter.hxx"
170 #endif
171 
172 #endif
typename TOutputImage::SpacingType SpacingType
typename OutputImageType::Pointer OutputImagePointer
typename InputPointSetType::ConstPointer InputPointSetConstPointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename TOutputImage::PointType PointType
typename InputPointSetType::Pointer InputPointSetPointer
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
Represent a n-dimensional size (bounds) of a n-dimensional image.
Definition: itkSize.h:68
typename TOutputImage::SizeType SizeType
typename OutputImageType::ValueType ValueType
Base class for filters that take a PointSet as input and produce an image as output. By default, if the user does not specify the size of the output image, the maximum size of the point-set&#39;s bounding box is used.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename TOutputImage::DirectionType DirectionType