VTK  9.2.6
vtkImageExport.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageExport.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
31
32#ifndef vtkImageExport_h
33#define vtkImageExport_h
34
35#include "vtkIOImageModule.h" // For export macro
36#include "vtkImageAlgorithm.h"
37
38class VTKIOIMAGE_EXPORT vtkImageExport : public vtkImageAlgorithm
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
49
51
55 void GetDataDimensions(int* ptr);
57 {
59 return this->DataDimensions;
60 }
61
62
69
76 {
77 return vtkImageScalarTypeNameMacro(this->GetDataScalarType());
78 }
79
81
85 void GetDataExtent(int* ptr);
87 void GetDataSpacing(double* ptr);
89 void GetDataOrigin(double* ptr);
91 void GetDataDirection(double* ptr);
93
98
100
108 vtkBooleanMacro(ImageLowerLeft, vtkTypeBool);
112
114
120 void* GetExportVoidPointer() { return this->ExportVoidPointer; }
122
124
129 void Export() { this->Export(this->ExportVoidPointer); }
130 virtual void Export(void*);
132
141
146
148
152 typedef void (*UpdateInformationCallbackType)(void*);
153 typedef int (*PipelineModifiedCallbackType)(void*);
154 typedef int* (*WholeExtentCallbackType)(void*);
155 typedef double* (*SpacingCallbackType)(void*);
156 typedef double* (*OriginCallbackType)(void*);
157 typedef double* (*DirectionCallbackType)(void*);
158 typedef const char* (*ScalarTypeCallbackType)(void*);
159 typedef int (*NumberOfComponentsCallbackType)(void*);
160 typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
161 typedef void (*UpdateDataCallbackType)(void*);
162 typedef int* (*DataExtentCallbackType)(void*);
163 typedef void* (*BufferPointerCallbackType)(void*);
165
167
183
184protected:
186 ~vtkImageExport() override;
187
188 // This is called by the superclass.
190 vtkInformationVector* outputVector) override;
191
194 virtual void UpdateDataCallback();
195 virtual int* WholeExtentCallback();
196 virtual double* SpacingCallback();
197 virtual double* OriginCallback();
198 virtual double* DirectionCallback();
199 virtual const char* ScalarTypeCallback();
202 virtual int* DataExtentCallback();
203 virtual void* BufferPointerCallback();
204
208
210
211private:
212 vtkImageExport(const vtkImageExport&) = delete;
213 void operator=(const vtkImageExport&) = delete;
214
215 static void UpdateInformationCallbackFunction(void*);
216 static int PipelineModifiedCallbackFunction(void*);
217 static int* WholeExtentCallbackFunction(void*);
218 static double* SpacingCallbackFunction(void*);
219 static double* OriginCallbackFunction(void*);
220 static double* DirectionCallbackFunction(void*);
221 static const char* ScalarTypeCallbackFunction(void*);
222 static int NumberOfComponentsCallbackFunction(void*);
223 static void PropagateUpdateExtentCallbackFunction(void*, int*);
224 static void UpdateDataCallbackFunction(void*);
225 static int* DataExtentCallbackFunction(void*);
226 static void* BufferPointerCallbackFunction(void*);
227
230};
231
232#endif
vtkInformation * GetInputInformation()
Equivalent to GetInputInformation(0, 0)
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(0, 0).
topologically and geometrically regular array of data
void * GetPointerToData()
An alternative to Export(): Use with caution.
double * GetDataSpacing()
Get miscellaneous additional information about the data.
WholeExtentCallbackType GetWholeExtentCallback() const
Get pointers to the pipeline interface callbacks.
DataExtentCallbackType GetDataExtentCallback() const
Get pointers to the pipeline interface callbacks.
virtual int * DataExtentCallback()
int GetDataNumberOfScalarComponents()
Get the number of scalar components of the data.
int *(* WholeExtentCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
vtkImageData * GetInput()
Get the input object from the image pipeline.
NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const
Get pointers to the pipeline interface callbacks.
int GetDataScalarType()
Get the scalar type of the data.
vtkTypeBool ImageLowerLeft
virtual void Export(void *)
The main interface: update the pipeline and export the image to the memory pointed to by SetExportVoi...
BufferPointerCallbackType GetBufferPointerCallback() const
Get pointers to the pipeline interface callbacks.
void(* UpdateDataCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
PipelineModifiedCallbackType GetPipelineModifiedCallback() const
Get pointers to the pipeline interface callbacks.
const char * GetDataScalarTypeAsString()
void * GetExportVoidPointer()
Set the void pointer of the C array to export the data to.
PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const
Get pointers to the pipeline interface callbacks.
OriginCallbackType GetOriginCallback() const
Get pointers to the pipeline interface callbacks.
virtual int NumberOfComponentsCallback()
void(* UpdateInformationCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
double * GetDataDirection()
Get miscellaneous additional information about the data.
const char *(* ScalarTypeCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
virtual double * OriginCallback()
virtual double * SpacingCallback()
UpdateDataCallbackType GetUpdateDataCallback() const
Get pointers to the pipeline interface callbacks.
static vtkImageExport * New()
ScalarTypeCallbackType GetScalarTypeCallback() const
Get pointers to the pipeline interface callbacks.
SpacingCallbackType GetSpacingCallback() const
Get pointers to the pipeline interface callbacks.
virtual int * WholeExtentCallback()
int(* PipelineModifiedCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
double *(* DirectionCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
vtkIdType GetDataMemorySize()
Get the number of bytes required for the output C array.
double *(* OriginCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
virtual void * BufferPointerCallback()
void *(* BufferPointerCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
int * GetDataExtent()
Get miscellaneous additional information about the data.
double *(* SpacingCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
void Export()
The main interface: update the pipeline and export the image to the memory pointed to by SetExportVoi...
int * GetDataDimensions()
Get the (x,y,z) index dimensions of the data.
virtual double * DirectionCallback()
void SetExportVoidPointer(void *)
Set the void pointer of the C array to export the data to.
~vtkImageExport() override
virtual void UpdateDataCallback()
vtkMTimeType LastPipelineMTime
virtual void PropagateUpdateExtentCallback(int *)
virtual const char * ScalarTypeCallback()
int *(* DataExtentCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
int(* NumberOfComponentsCallbackType)(void *)
These are function pointer types for the pipeline connection callbacks.
void GetDataDimensions(int *ptr)
Get the (x,y,z) index dimensions of the data.
DirectionCallbackType GetDirectionCallback() const
Get pointers to the pipeline interface callbacks.
void(* PropagateUpdateExtentCallbackType)(void *, int *)
These are function pointer types for the pipeline connection callbacks.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called in response to a REQUEST_DATA request from the executive.
UpdateInformationCallbackType GetUpdateInformationCallback() const
Get pointers to the pipeline interface callbacks.
void * GetCallbackUserData()
Get the user data that should be passed to the callback functions.
virtual int PipelineModifiedCallback()
double * GetDataOrigin()
Get miscellaneous additional information about the data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void UpdateInformationCallback()
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287
#define VTK_SIZEHINT(...)