ITK  6.0.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  * 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 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_MOVE(VTKImageExport);
59 
65  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
66 
68  itkOverrideGetNameOfClassMacro(VTKImageExport);
69 
71  itkNewMacro(Self);
72 
74  using InputImageType = TInputImage;
75 
77 
79  using Superclass::SetInput;
80  void
81  SetInput(const InputImageType *);
83  GetInput();
86 protected:
88  ~VTKImageExport() override = default;
89  void
90  PrintSelf(std::ostream & os, Indent indent) const override;
91 
96 
97  int *
98  WholeExtentCallback() override;
99 
100  double *
101  SpacingCallback() override;
102 
103  double *
104  OriginCallback() override;
105 
106  double *
107  DirectionCallback() override;
108 
109  float *
110  FloatSpacingCallback() override;
111 
112  float *
113  FloatOriginCallback() override;
114 
115  const char *
116  ScalarTypeCallback() override;
117 
118  int
119  NumberOfComponentsCallback() override;
120 
121  void
122  PropagateUpdateExtentCallback(int *) override;
123 
124  int *
125  DataExtentCallback() override;
126 
127  void *
128  BufferPointerCallback() override;
129 
130 private:
131  std::string m_ScalarTypeName{};
132  int m_WholeExtent[6]{};
133  int m_DataExtent[6]{};
134  double m_DataSpacing[3]{};
135  double m_DataOrigin[3]{};
136  double m_DataDirection[9]{};
137  float m_FloatDataSpacing[3]{};
138  float m_FloatDataOrigin[3]{};
139 };
140 } // end namespace itk
141 
142 #ifndef ITK_MANUAL_INSTANTIATION
143 # include "itkVTKImageExport.hxx"
144 #endif
145 
146 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
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:94
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:55
itk::Concept::SameDimensionOrMinusOneOrTwo
Definition: itkConceptChecking.h:854
itk::VTKImageExport::InputIndexType
typename InputRegionType::IndexType InputIndexType
Definition: itkVTKImageExport.h:95
itk::VTKImageExport::InputRegionType
typename InputImageType::RegionType InputRegionType
Definition: itkVTKImageExport.h:93
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::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkVTKImageExport.h:92
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::VTKImageExport::InputImageType
TInputImage InputImageType
Definition: itkVTKImageExport.h:74