ITK  4.13.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:
45 
47  itkTypeMacro(VTKImageExportBase, ProcessObject);
48 
50  void * GetCallbackUserData();
51 
53  typedef void ( * UpdateInformationCallbackType )(void *);
54  typedef int ( * PipelineModifiedCallbackType )(void *);
55  typedef int * ( * WholeExtentCallbackType )(void *);
56  typedef double * ( * SpacingCallbackType )(void *);
57  typedef double * ( * OriginCallbackType )(void *);
58  typedef const char * ( *ScalarTypeCallbackType )(void *);
59  typedef int ( * NumberOfComponentsCallbackType )(void *);
60  typedef void ( * PropagateUpdateExtentCallbackType )(void *, int *);
61  typedef void ( * UpdateDataCallbackType )(void *);
62  typedef int * ( * DataExtentCallbackType )(void *);
63  typedef void * ( * BufferPointerCallbackType )(void *);
65 
67  typedef float * ( *FloatSpacingCallbackType )(void *);
68  typedef float * ( *FloatOriginCallbackType )(void *);
70 
76  {
77 public:
78  typedef double * ( *DoubleCallbackType )(void *);
79  typedef float * ( * FloatCallbackType )(void *);
80  operator DoubleCallbackType()
81  {
82  return m_DoubleCallback;
83  }
84 
85  operator FloatCallbackType()
86  {
87  return m_FloatCallback;
88  }
89  CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f):
90  m_DoubleCallback(d), m_FloatCallback(f) {}
91 
92 private:
93  DoubleCallbackType m_DoubleCallback;
94  FloatCallbackType m_FloatCallback;
95  };
96 
98  UpdateInformationCallbackType GetUpdateInformationCallback() const;
99 
100  PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
101 
102  WholeExtentCallbackType GetWholeExtentCallback() const;
103 
104  CallbackTypeProxy GetSpacingCallback() const;
105 
106  CallbackTypeProxy GetOriginCallback() const;
107 
108  ScalarTypeCallbackType GetScalarTypeCallback() const;
109 
110  NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
111 
112  PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
113 
114  UpdateDataCallbackType GetUpdateDataCallback() const;
115 
116  DataExtentCallbackType GetDataExtentCallback() const;
117 
118  BufferPointerCallbackType GetBufferPointerCallback() const;
119 
120 protected:
122  ~VTKImageExportBase() ITK_OVERRIDE {}
123  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
124 
126 
127  virtual void UpdateInformationCallback();
128 
129  virtual int PipelineModifiedCallback();
130 
131  virtual void UpdateDataCallback();
132 
135  virtual int * WholeExtentCallback() = 0;
136 
137  virtual double * SpacingCallback() = 0;
138 
139  virtual double * OriginCallback() = 0;
140 
141  virtual float * FloatSpacingCallback() = 0;
142 
143  virtual float * FloatOriginCallback() = 0;
144 
145  virtual const char * ScalarTypeCallback() = 0;
146 
147  virtual int NumberOfComponentsCallback() = 0;
148 
149  virtual void PropagateUpdateExtentCallback(int *) = 0;
150 
151  virtual int * DataExtentCallback() = 0;
152 
153  virtual void * BufferPointerCallback() = 0;
154 
155 private:
156  ITK_DISALLOW_COPY_AND_ASSIGN(VTKImageExportBase);
157 
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
SmartPointer< Self > Pointer
DataObject::Pointer DataObjectPointer
SmartPointer< const Self > ConstPointer
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Provide compatibility between VTK 4.4 and earlier versions.
Superclass for VTKImageExport instantiations.
CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f)
ModifiedTimeType m_LastPipelineMTime
Control indentation during Print() invocation.
Definition: itkIndent.h:49