ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVTKImageExportBase.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 itkVTKImageExportBase_h
19 #define itkVTKImageExportBase_h
20 
21 #include "itkProcessObject.h"
22 #include "ITKVTKExport.h"
23 
24 namespace itk
25 {
37 class ITKVTK_EXPORT VTKImageExportBase:public ProcessObject
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageExportBase);
41 
47 
49  itkTypeMacro(VTKImageExportBase, ProcessObject);
50 
52  void * GetCallbackUserData();
53 
55  using UpdateInformationCallbackType = void (*)(void *);
56  using PipelineModifiedCallbackType = int (*)(void *);
57  using WholeExtentCallbackType = int *(*)(void *);
58  using SpacingCallbackType = double *(*)(void *);
59  using OriginCallbackType = double *(*)(void *);
60  using ScalarTypeCallbackType = const char *(*)(void *);
61  using NumberOfComponentsCallbackType = int (*)(void *);
62  using PropagateUpdateExtentCallbackType = void (*)(void *, int *);
63  using UpdateDataCallbackType = void (*)(void *);
64  using DataExtentCallbackType = int *(*)(void *);
65  using BufferPointerCallbackType = void *(*)(void *);
67 
69  using FloatSpacingCallbackType = float *(*)(void *);
70  using FloatOriginCallbackType = float *(*)(void *);
72 
78  {
79 public:
80  using DoubleCallbackType = double *(*)(void *);
81  using FloatCallbackType = float *(*)(void *);
82  operator DoubleCallbackType()
83  {
84  return m_DoubleCallback;
85  }
86 
87  operator FloatCallbackType()
88  {
89  return m_FloatCallback;
90  }
92  m_DoubleCallback(d), m_FloatCallback(f) {}
93 
94 private:
97  };
98 
100  UpdateInformationCallbackType GetUpdateInformationCallback() const;
101 
102  PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
103 
104  WholeExtentCallbackType GetWholeExtentCallback() const;
105 
106  CallbackTypeProxy GetSpacingCallback() const;
107 
108  CallbackTypeProxy GetOriginCallback() const;
109 
110  ScalarTypeCallbackType GetScalarTypeCallback() const;
111 
112  NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
113 
114  PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
115 
116  UpdateDataCallbackType GetUpdateDataCallback() const;
117 
118  DataExtentCallbackType GetDataExtentCallback() const;
119 
120  BufferPointerCallbackType GetBufferPointerCallback() const;
121 
122 protected:
124  ~VTKImageExportBase() override = default;
125  void PrintSelf(std::ostream & os, Indent indent) const override;
126 
128 
129  virtual void UpdateInformationCallback();
130 
131  virtual int PipelineModifiedCallback();
132 
133  virtual void UpdateDataCallback();
134 
137  virtual int * WholeExtentCallback() = 0;
138 
139  virtual double * SpacingCallback() = 0;
140 
141  virtual double * OriginCallback() = 0;
142 
143  virtual float * FloatSpacingCallback() = 0;
144 
145  virtual float * FloatOriginCallback() = 0;
146 
147  virtual const char * ScalarTypeCallback() = 0;
148 
149  virtual int NumberOfComponentsCallback() = 0;
150 
151  virtual void PropagateUpdateExtentCallback(int *) = 0;
152 
153  virtual int * DataExtentCallback() = 0;
154 
155  virtual void * BufferPointerCallback() = 0;
156 
157 private:
161  static void UpdateInformationCallbackFunction(void *);
162 
163  static int PipelineModifiedCallbackFunction(void *);
164 
165  static int * WholeExtentCallbackFunction(void *);
166 
167  static double * SpacingCallbackFunction(void *);
168 
169  static double * OriginCallbackFunction(void *);
170 
171  static float * FloatSpacingCallbackFunction(void *);
172 
173  static float * FloatOriginCallbackFunction(void *);
174 
175  static const char * ScalarTypeCallbackFunction(void *);
176 
177  static int NumberOfComponentsCallbackFunction(void *);
178 
179  static void PropagateUpdateExtentCallbackFunction(void *, int *);
180 
181  static void UpdateDataCallbackFunction(void *);
182 
183  static int * DataExtentCallbackFunction(void *);
184 
185  static void * BufferPointerCallbackFunction(void *);
186 
187 private:
190 };
191 } // end namespace itk
192 
193 #endif
const char *(*)(void *) ScalarTypeCallbackType
Light weight base class for most itk classes.
void(*)(void *) UpdateDataCallbackType
int(*)(void *) NumberOfComponentsCallbackType
float *(*)(void *) FloatOriginCallbackType
void *(*)(void *) BufferPointerCallbackType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
int(*)(void *) PipelineModifiedCallbackType
float *(*)(void *) FloatSpacingCallbackType
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
void(*)(void *) UpdateInformationCallbackType
void(*)(void *, int *) PropagateUpdateExtentCallbackType
Provide compatibility between VTK 4.4 and earlier versions.
double *(*)(void *) SpacingCallbackType
int *(*)(void *) DataExtentCallbackType
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:104
Superclass for VTKImageExport instantiations.
CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f)
int *(*)(void *) WholeExtentCallbackType
ModifiedTimeType m_LastPipelineMTime
Control indentation during Print() invocation.
Definition: itkIndent.h:49
double *(*)(void *) OriginCallbackType
SmartPointer< Self > Pointer