ITK  5.2.0
Insight Toolkit
itkVTKImageExport.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  * 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 itkVTKImageExport_h
19 #define itkVTKImageExport_h
20 
21 #include "itkVTKImageExportBase.h"
22 #include "itkConceptChecking.h"
23 
24 namespace itk
25 {
54 template <typename TInputImage>
55 class ITK_TEMPLATE_EXPORT VTKImageExport : public VTKImageExportBase
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageExport);
59 
65  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
66 
68  itkTypeMacro(VTKImageExport, VTKImageExportBase);
69 
71  itkNewMacro(Self);
72 
74  using InputImageType = TInputImage;
75 
76 #ifdef ITK_USE_CONCEPT_CHECKING
78 #endif
79 
80  using Superclass::SetInput;
81  void
82  SetInput(const InputImageType *);
84  GetInput();
86 
87 protected:
89  ~VTKImageExport() override = default;
90  void
91  PrintSelf(std::ostream & os, Indent indent) const override;
92 
93  using InputImagePointer = typename InputImageType::Pointer;
97 
98  int *
99  WholeExtentCallback() override;
100 
101  double *
102  SpacingCallback() override;
103 
104  double *
105  OriginCallback() override;
106 
107  double *
108  DirectionCallback() override;
109 
110  float *
111  FloatSpacingCallback() override;
112 
113  float *
114  FloatOriginCallback() override;
115 
116  const char *
117  ScalarTypeCallback() override;
118 
119  int
120  NumberOfComponentsCallback() override;
121 
122  void
123  PropagateUpdateExtentCallback(int *) override;
124 
125  int *
126  DataExtentCallback() override;
127 
128  void *
129  BufferPointerCallback() override;
130 
131 private:
132  std::string m_ScalarTypeName;
133  int m_WholeExtent[6];
134  int m_DataExtent[6];
135  double m_DataSpacing[3];
136  double m_DataOrigin[3];
137  double m_DataDirection[9];
138  float m_FloatDataSpacing[3];
139  float m_FloatDataOrigin[3];
140 };
141 } // end namespace itk
142 
143 #ifndef ITK_MANUAL_INSTANTIATION
144 # include "itkVTKImageExport.hxx"
145 #endif
146 
147 #endif
itkVTKImageExportBase.h
itkConceptChecking.h
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::VTKImageExport::InputSizeType
typename InputRegionType::SizeType InputSizeType
Definition: itkVTKImageExport.h:95
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Concept::SameDimensionOrMinusOneOrTwo
Definition: itkConceptChecking.h:846
itk::VTKImageExport::InputIndexType
typename InputRegionType::IndexType InputIndexType
Definition: itkVTKImageExport.h:96
itk::VTKImageExport::InputRegionType
typename InputImageType::RegionType InputRegionType
Definition: itkVTKImageExport.h:94
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::VTKImageExport
Connect the end of an ITK image pipeline to a VTK pipeline.
Definition: itkVTKImageExport.h:55
itk::VTKImageExportBase
Superclass for VTKImageExport instantiations.
Definition: itkVTKImageExportBase.h:38
itk::VTKImageExport::m_ScalarTypeName
std::string m_ScalarTypeName
Definition: itkVTKImageExport.h:132
itk::VTKImageExport::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkVTKImageExport.h:93
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::VTKImageExport::InputImageType
TInputImage InputImageType
Definition: itkVTKImageExport.h:74