ITK  4.8.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:
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  VTKImageExportBase(const Self &); //purposely not implemented
157  void operator=(const Self &); //purposely not implemented
158 
162  static void UpdateInformationCallbackFunction(void *);
163 
164  static int PipelineModifiedCallbackFunction(void *);
165 
166  static int * WholeExtentCallbackFunction(void *);
167 
168  static double * SpacingCallbackFunction(void *);
169 
170  static double * OriginCallbackFunction(void *);
171 
172  static float * FloatSpacingCallbackFunction(void *);
173 
174  static float * FloatOriginCallbackFunction(void *);
175 
176  static const char * ScalarTypeCallbackFunction(void *);
177 
178  static int NumberOfComponentsCallbackFunction(void *);
179 
180  static void PropagateUpdateExtentCallbackFunction(void *, int *);
181 
182  static void UpdateDataCallbackFunction(void *);
183 
184  static int * DataExtentCallbackFunction(void *);
185 
186  static void * BufferPointerCallbackFunction(void *);
187 
188 private:
191 };
192 } // end namespace itk
193 
194 #endif
Light weight base class for most itk classes.
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