ITK  6.0.0
Insight Toolkit
itkTileImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 itkTileImageFilter_h
19 #define itkTileImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkFixedArray.h"
23 
24 namespace itk
25 {
51 template <typename TInputImage, typename TOutputImage>
52 class ITK_TEMPLATE_EXPORT TileImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(TileImageFilter);
56 
62 
64  itkNewMacro(Self);
65 
67  itkOverrideGetNameOfClassMacro(TileImageFilter);
68 
70  using InputPixelType = typename TInputImage::PixelType;
71  using OutputPixelType = typename TOutputImage::PixelType;
73 
77 
78 
85 
87  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
88  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
89 
95  class TileInfo
96  {
97  public:
98  int m_ImageNumber{ -1 };
100  TileInfo() = default;
101  };
102 
104 
107 
111  itkSetMacro(Layout, LayoutArrayType);
112  itkGetConstMacro(Layout, LayoutArrayType);
117  itkSetMacro(DefaultPixelValue, OutputPixelType);
118 
121  itkGetConstMacro(DefaultPixelValue, OutputPixelType);
122 
123 #ifdef ITK_USE_CONCEPT_CHECKING
124  // Begin concept checking
125  itkConceptMacro(OutputEqualityComparableCheck, (Concept::EqualityComparable<OutputPixelType>));
127  itkConceptMacro(OutputOStreamWritableCheck, (Concept::OStreamWritable<OutputPixelType>));
128  // End concept checking
129 #endif
130 
131 protected:
132  TileImageFilter();
133  ~TileImageFilter() override = default;
134 
135  void
136  PrintSelf(std::ostream & os, Indent indent) const override;
137 
138  void
139  GenerateInputRequestedRegion() override;
140 
141  void
142  GenerateOutputInformation() override;
143 
144  void
145  GenerateData() override;
146 
152  void
153  VerifyInputInformation() const override;
154 
155 private:
156  typename TileImageType::Pointer m_TileImage{};
157 
158  OutputPixelType m_DefaultPixelValue{};
159 
160  LayoutArrayType m_Layout{};
161 }; // end of class
162 } // end namespace itk
163 
164 #ifndef ITK_MANUAL_INSTANTIATION
165 # include "itkTileImageFilter.hxx"
166 #endif
167 
168 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::TileImageFilter::InputSizeType
typename TInputImage::SizeType InputSizeType
Definition: itkTileImageFilter.h:79
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:638
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::TileImageFilter::TileInfo
Definition: itkTileImageFilter.h:95
itk::TileImageFilter::OutputSizeType
typename TOutputImage::SizeType OutputSizeType
Definition: itkTileImageFilter.h:82
itk::TileImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkTileImageFilter.h:71
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::TileImageFilter::InputIndexType
typename TInputImage::IndexType InputIndexType
Definition: itkTileImageFilter.h:80
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::TileImageFilter::TileInfo::m_Region
OutputImageRegionType m_Region
Definition: itkTileImageFilter.h:99
itk::TileImageFilter
Tile multiple input images into a single output image.
Definition: itkTileImageFilter.h:52
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::TileImageFilter::OutputPixelComponentType
typename NumericTraits< OutputPixelType >::ValueType OutputPixelComponentType
Definition: itkTileImageFilter.h:72
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::TileImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkTileImageFilter.h:70
itkFixedArray.h
itkImageToImageFilter.h
itk::FixedArray< unsigned int, Self::OutputImageDimension >
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:60
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk::Concept::SameType
Definition: itkConceptChecking.h:679
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::TileImageFilter::OutputIndexType
typename TOutputImage::IndexType OutputIndexType
Definition: itkTileImageFilter.h:83
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:306