ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVTKImageExport.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 itkVTKImageExport_h
19 #define itkVTKImageExport_h
20 
21 #include "itkVTKImageExportBase.h"
22 #include "itkConceptChecking.h"
23 
24 namespace itk
25 {
53 template< typename TInputImage >
54 class ITK_TEMPLATE_EXPORT VTKImageExport:public VTKImageExportBase
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageExport);
58 
64  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
65 
67  itkTypeMacro(VTKImageExport, VTKImageExportBase);
68 
70  itkNewMacro(Self);
71 
73  using InputImageType = TInputImage;
74 
75 #ifdef ITK_USE_CONCEPT_CHECKING
76  itkConceptMacro( ImageDimensionCheck,
78  3,Self::InputImageDimension > ) );
79 #endif
80 
81  using Superclass::SetInput;
82  void SetInput(const InputImageType *);
83  InputImageType * GetInput();
85 
86 protected:
88  ~VTKImageExport() override = default;
89  void PrintSelf(std::ostream & os, Indent indent) const override;
90 
91  using InputImagePointer = typename InputImageType::Pointer;
95 
96  int * WholeExtentCallback() override;
97 
98  double * SpacingCallback() override;
99 
100  double * OriginCallback() override;
101 
102  float * FloatSpacingCallback() override;
103 
104  float * FloatOriginCallback() override;
105 
106  const char * ScalarTypeCallback() override;
107 
108  int NumberOfComponentsCallback() override;
109 
110  void PropagateUpdateExtentCallback(int *) override;
111 
112  int * DataExtentCallback() override;
113 
114  void * BufferPointerCallback() override;
115 
116 private:
117  std::string m_ScalarTypeName;
118  int m_WholeExtent[6];
119  int m_DataExtent[6];
120  double m_DataSpacing[3];
121  double m_DataOrigin[3];
122  float m_FloatDataSpacing[3];
123  float m_FloatDataOrigin[3];
124 };
125 } // end namespace itk
126 
127 #ifndef ITK_MANUAL_INSTANTIATION
128 #include "itkVTKImageExport.hxx"
129 #endif
130 
131 #endif
Connect the end of an ITK image pipeline to a VTK pipeline.
Light weight base class for most itk classes.
std::string m_ScalarTypeName
typename InputRegionType::IndexType InputIndexType
typename InputRegionType::SizeType InputSizeType
typename InputImageType::RegionType InputRegionType
typename InputImageType::Pointer InputImagePointer
Superclass for VTKImageExport instantiations.
TInputImage InputImageType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)