ITK  6.0.0
Insight Toolkit
itkVTKImageExportBase.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 itkVTKImageExportBase_h
19 #define itkVTKImageExportBase_h
20 
21 #include "itkProcessObject.h"
22 #include "ITKVTKExport.h"
23 
24 namespace itk
25 {
38 class ITKVTK_EXPORT VTKImageExportBase : public ProcessObject
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_MOVE(VTKImageExportBase);
42 
48 
50  itkOverrideGetNameOfClassMacro(VTKImageExportBase);
51 
53  void *
54  GetCallbackUserData();
55 
57  using UpdateInformationCallbackType = void (*)(void *);
58  using PipelineModifiedCallbackType = int (*)(void *);
59  using WholeExtentCallbackType = int * (*)(void *);
60  using SpacingCallbackType = double * (*)(void *);
61  using OriginCallbackType = double * (*)(void *);
62  using DirectionCallbackType = double * (*)(void *);
63  using ScalarTypeCallbackType = const char * (*)(void *);
64  using NumberOfComponentsCallbackType = int (*)(void *);
65  using PropagateUpdateExtentCallbackType = void (*)(void *, int *);
66  using UpdateDataCallbackType = void (*)(void *);
67  using DataExtentCallbackType = int * (*)(void *);
68  using BufferPointerCallbackType = void * (*)(void *);
72  using FloatSpacingCallbackType = float * (*)(void *);
73  using FloatOriginCallbackType = float * (*)(void *);
82  {
83  public:
84  using DoubleCallbackType = double * (*)(void *);
85  using FloatCallbackType = float * (*)(void *);
86  operator DoubleCallbackType() { return m_DoubleCallback; }
89  operator FloatCallbackType() { return m_FloatCallback; }
91  : m_DoubleCallback(d)
92  , m_FloatCallback(f)
93  {}
94 
95  private:
98  };
99 
102  GetUpdateInformationCallback() const;
103 
105  GetPipelineModifiedCallback() const;
106 
108  GetWholeExtentCallback() const;
109 
111  GetSpacingCallback() const;
112 
114  GetOriginCallback() const;
115 
117  GetDirectionCallback() const;
118 
120  GetScalarTypeCallback() const;
121 
123  GetNumberOfComponentsCallback() const;
124 
126  GetPropagateUpdateExtentCallback() const;
127 
129  GetUpdateDataCallback() const;
130 
132  GetDataExtentCallback() const;
133 
135  GetBufferPointerCallback() const;
136 
137 protected:
139  ~VTKImageExportBase() override = default;
140  void
141  PrintSelf(std::ostream & os, Indent indent) const override;
142 
144 
145  virtual void
146  UpdateInformationCallback();
147 
148  virtual int
149  PipelineModifiedCallback();
150 
151  virtual void
152  UpdateDataCallback();
153 
156  virtual int *
157  WholeExtentCallback() = 0;
158 
159  virtual double *
160  SpacingCallback() = 0;
161 
162  virtual double *
163  OriginCallback() = 0;
164 
165  virtual double *
166  DirectionCallback() = 0;
167 
168  virtual float *
169  FloatSpacingCallback() = 0;
170 
171  virtual float *
172  FloatOriginCallback() = 0;
173 
174  virtual const char *
175  ScalarTypeCallback() = 0;
176 
177  virtual int
178  NumberOfComponentsCallback() = 0;
179 
180  virtual void
181  PropagateUpdateExtentCallback(int *) = 0;
182 
183  virtual int *
184  DataExtentCallback() = 0;
185 
186  virtual void *
187  BufferPointerCallback() = 0;
188 
189 private:
193  static void
194  UpdateInformationCallbackFunction(void *);
195 
196  static int
197  PipelineModifiedCallbackFunction(void *);
198 
199  static int *
200  WholeExtentCallbackFunction(void *);
201 
202  static double *
203  SpacingCallbackFunction(void *);
204 
205  static double *
206  OriginCallbackFunction(void *);
207 
208  static double *
209  DirectionCallbackFunction(void *);
210 
211  static float *
212  FloatSpacingCallbackFunction(void *);
213 
214  static float *
215  FloatOriginCallbackFunction(void *);
216 
217  static const char *
218  ScalarTypeCallbackFunction(void *);
219 
220  static int
221  NumberOfComponentsCallbackFunction(void *);
222 
223  static void
224  PropagateUpdateExtentCallbackFunction(void *, int *);
225 
226  static void
227  UpdateDataCallbackFunction(void *);
228 
229  static int *
230  DataExtentCallbackFunction(void *);
231 
232  static void *
233  BufferPointerCallbackFunction(void *);
234 
235 private:
237  ModifiedTimeType m_LastPipelineMTime{};
238 };
239 } // end namespace itk
240 
241 #endif
itk::VTKImageExportBase::CallbackTypeProxy::DoubleCallbackType
double *(*)(void *) DoubleCallbackType
Definition: itkVTKImageExportBase.h:84
itk::VTKImageExportBase::PipelineModifiedCallbackType
int(*)(void *) PipelineModifiedCallbackType
Definition: itkVTKImageExportBase.h:58
itk::VTKImageExportBase::FloatOriginCallbackType
float *(*)(void *) FloatOriginCallbackType
Definition: itkVTKImageExportBase.h:73
itk::ModifiedTimeType
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:105
itk::VTKImageExportBase::UpdateInformationCallbackType
void(*)(void *) UpdateInformationCallbackType
Definition: itkVTKImageExportBase.h:57
itk::VTKImageExportBase::DataExtentCallbackType
int *(*)(void *) DataExtentCallbackType
Definition: itkVTKImageExportBase.h:67
itk::VTKImageExportBase::FloatSpacingCallbackType
float *(*)(void *) FloatSpacingCallbackType
Definition: itkVTKImageExportBase.h:72
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::VTKImageExportBase::BufferPointerCallbackType
void *(*)(void *) BufferPointerCallbackType
Definition: itkVTKImageExportBase.h:68
itk::VTKImageExportBase::CallbackTypeProxy::m_FloatCallback
FloatCallbackType m_FloatCallback
Definition: itkVTKImageExportBase.h:97
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkProcessObject.h
itk::VTKImageExportBase::DirectionCallbackType
double *(*)(void *) DirectionCallbackType
Definition: itkVTKImageExportBase.h:62
itk::VTKImageExportBase::CallbackTypeProxy::FloatCallbackType
float *(*)(void *) FloatCallbackType
Definition: itkVTKImageExportBase.h:85
itk::VTKImageExportBase::NumberOfComponentsCallbackType
int(*)(void *) NumberOfComponentsCallbackType
Definition: itkVTKImageExportBase.h:64
itk::VTKImageExportBase
Superclass for VTKImageExport instantiations.
Definition: itkVTKImageExportBase.h:38
itk::VTKImageExportBase::PropagateUpdateExtentCallbackType
void(*)(void *, int *) PropagateUpdateExtentCallbackType
Definition: itkVTKImageExportBase.h:65
itk::VTKImageExportBase::CallbackTypeProxy::CallbackTypeProxy
CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f)
Definition: itkVTKImageExportBase.h:90
itk::VTKImageExportBase::SpacingCallbackType
double *(*)(void *) SpacingCallbackType
Definition: itkVTKImageExportBase.h:60
itk::VTKImageExportBase::OriginCallbackType
double *(*)(void *) OriginCallbackType
Definition: itkVTKImageExportBase.h:61
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::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::VTKImageExportBase::WholeExtentCallbackType
int *(*)(void *) WholeExtentCallbackType
Definition: itkVTKImageExportBase.h:59
itk::VTKImageExportBase::CallbackTypeProxy::m_DoubleCallback
DoubleCallbackType m_DoubleCallback
Definition: itkVTKImageExportBase.h:96
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::VTKImageExportBase::CallbackTypeProxy
Provide compatibility between VTK 4.4 and earlier versions.
Definition: itkVTKImageExportBase.h:81
itk::VTKImageExportBase::ScalarTypeCallbackType
const char *(*)(void *) ScalarTypeCallbackType
Definition: itkVTKImageExportBase.h:63
itk::VTKImageExportBase::UpdateDataCallbackType
void(*)(void *) UpdateDataCallbackType
Definition: itkVTKImageExportBase.h:66