ITK  4.3.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 
23 namespace itk
24 {
36 class ITK_EXPORT VTKImageExportBase:public ProcessObject
37 {
38 public:
44 
46  itkTypeMacro(VTKImageExportBase, ProcessObject);
47 
49  void * GetCallbackUserData();
50 
52  typedef void ( * UpdateInformationCallbackType )(void *);
53  typedef int ( * PipelineModifiedCallbackType )(void *);
54  typedef int * ( * WholeExtentCallbackType )(void *);
55  typedef double * ( * SpacingCallbackType )(void *);
56  typedef double * ( * OriginCallbackType )(void *);
57  typedef const char * ( *ScalarTypeCallbackType )(void *);
58  typedef int ( * NumberOfComponentsCallbackType )(void *);
59  typedef void ( * PropagateUpdateExtentCallbackType )(void *, int *);
60  typedef void ( * UpdateDataCallbackType )(void *);
61  typedef int * ( * DataExtentCallbackType )(void *);
62  typedef void * ( * BufferPointerCallbackType )(void *);
64 
66  typedef float * ( *FloatSpacingCallbackType )(void *);
67  typedef float * ( *FloatOriginCallbackType )(void *);
69 
75  {
76 public:
77  typedef double * ( *DoubleCallbackType )(void *);
78  typedef float * ( * FloatCallbackType )(void *);
79  operator DoubleCallbackType()
80  {
81  return m_DoubleCallback;
82  }
83 
84  operator FloatCallbackType()
85  {
86  return m_FloatCallback;
87  }
88  CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f):
89  m_DoubleCallback(d), m_FloatCallback(f) {}
90 
91 private:
92  DoubleCallbackType m_DoubleCallback;
93  FloatCallbackType m_FloatCallback;
94  };
95 
97  UpdateInformationCallbackType GetUpdateInformationCallback() const;
98 
99  PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
100 
101  WholeExtentCallbackType GetWholeExtentCallback() const;
102 
103  CallbackTypeProxy GetSpacingCallback() const;
104 
105  CallbackTypeProxy GetOriginCallback() const;
106 
107  ScalarTypeCallbackType GetScalarTypeCallback() const;
108 
109  NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
110 
111  PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
112 
113  UpdateDataCallbackType GetUpdateDataCallback() const;
114 
115  DataExtentCallbackType GetDataExtentCallback() const;
116 
117  BufferPointerCallbackType GetBufferPointerCallback() const;
118 
119 protected:
122  void PrintSelf(std::ostream & os, Indent indent) const;
123 
125 
126  virtual void UpdateInformationCallback();
127 
128  virtual int PipelineModifiedCallback();
129 
130  virtual void UpdateDataCallback();
131 
134  virtual int * WholeExtentCallback() = 0;
135 
136  virtual double * SpacingCallback() = 0;
137 
138  virtual double * OriginCallback() = 0;
139 
140  virtual float * FloatSpacingCallback() = 0;
141 
142  virtual float * FloatOriginCallback() = 0;
143 
144  virtual const char * ScalarTypeCallback() = 0;
145 
146  virtual int NumberOfComponentsCallback() = 0;
147 
148  virtual void PropagateUpdateExtentCallback(int *) = 0;
149 
150  virtual int * DataExtentCallback() = 0;
151 
152  virtual void * BufferPointerCallback() = 0;
153 
154 private:
155  VTKImageExportBase(const Self &); //purposely not implemented
156  void operator=(const Self &); //purposely not implemented
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
194