VTK
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=========================================================================*/
35#ifndef vtkImageExport_h
36#define vtkImageExport_h
37
38#include "vtkIOImageModule.h" // For export macro
39#include "vtkImageAlgorithm.h"
40
41class VTKIOIMAGE_EXPORT vtkImageExport : public vtkImageAlgorithm
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent);
47
52
54
58 void GetDataDimensions(int *ptr);
60 this->GetDataDimensions(this->DataDimensions);
61 return this->DataDimensions; }
63
70
77 return vtkImageScalarTypeNameMacro(this->GetDataScalarType()); }
78
80
84 void GetDataExtent(int *ptr);
85 double *GetDataSpacing();
86 void GetDataSpacing(double *ptr);
87 double *GetDataOrigin();
88 void GetDataOrigin(double *ptr);
90
95
97
105 vtkBooleanMacro(ImageLowerLeft, int);
106 vtkGetMacro(ImageLowerLeft, int);
107 vtkSetMacro(ImageLowerLeft, int);
109
111
117 void *GetExportVoidPointer() { return this->ExportVoidPointer; };
119
121
126 void Export() { this->Export(this->ExportVoidPointer); };
127 virtual void Export(void *);
129
138
143
145
149 typedef void (*UpdateInformationCallbackType)(void*);
150 typedef int (*PipelineModifiedCallbackType)(void*);
151 typedef int* (*WholeExtentCallbackType)(void*);
152 typedef double* (*SpacingCallbackType)(void*);
153 typedef double* (*OriginCallbackType)(void*);
154 typedef const char* (*ScalarTypeCallbackType)(void*);
155 typedef int (*NumberOfComponentsCallbackType)(void*);
156 typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
157 typedef void (*UpdateDataCallbackType)(void*);
158 typedef int* (*DataExtentCallbackType)(void*);
159 typedef void* (*BufferPointerCallbackType)(void*);
161
163
166 UpdateInformationCallbackType GetUpdateInformationCallback() const;
167 PipelineModifiedCallbackType GetPipelineModifiedCallback() const;
168 WholeExtentCallbackType GetWholeExtentCallback() const;
169 SpacingCallbackType GetSpacingCallback() const;
170 OriginCallbackType GetOriginCallback() const;
171 ScalarTypeCallbackType GetScalarTypeCallback() const;
172 NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const;
173 PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
174 UpdateDataCallbackType GetUpdateDataCallback() const;
175 DataExtentCallbackType GetDataExtentCallback() const;
176 BufferPointerCallbackType GetBufferPointerCallback() const;
178
179protected:
182
183 // This is called by the superclass.
184 virtual int RequestData(vtkInformation *request,
185 vtkInformationVector** inputVector,
186 vtkInformationVector* outputVector);
187
190 virtual void UpdateDataCallback();
191 virtual int* WholeExtentCallback();
192 virtual double* SpacingCallback();
193 virtual double* OriginCallback();
194 virtual const char* ScalarTypeCallback();
197 virtual int* DataExtentCallback();
198 virtual void* BufferPointerCallback();
199
201 int DataDimensions[3];
203
205
206private:
207 vtkImageExport(const vtkImageExport&) VTK_DELETE_FUNCTION;
208 void operator=(const vtkImageExport&) VTK_DELETE_FUNCTION;
209
210 static void UpdateInformationCallbackFunction(void*);
211 static int PipelineModifiedCallbackFunction(void*);
212 static int* WholeExtentCallbackFunction(void*);
213 static double* SpacingCallbackFunction(void*);
214 static double* OriginCallbackFunction(void*);
215 static const char* ScalarTypeCallbackFunction(void*);
216 static int NumberOfComponentsCallbackFunction(void*);
217 static void PropagateUpdateExtentCallbackFunction(void*, int*);
218 static void UpdateDataCallbackFunction(void*);
219 static int* DataExtentCallbackFunction(void*);
220 static void* BufferPointerCallbackFunction(void*);
221
224};
225
226#endif
227
228
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
vtkInformation * GetInputInformation()
Equivalent to GetInputInformation(0, 0)
Definition: vtkAlgorithm.h:523
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(0, 0).
Definition: vtkAlgorithm.h:491
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
Export VTK images to third-party systems.
void GetDataOrigin(double *ptr)
void * GetPointerToData()
An alternative to Export(): Use with caution.
double * GetDataSpacing()
WholeExtentCallbackType GetWholeExtentCallback() const
DataExtentCallbackType GetDataExtentCallback() const
virtual int * DataExtentCallback()
void * ExportVoidPointer
int GetDataNumberOfScalarComponents()
Get the number of scalar components of the data.
vtkImageData * GetInput()
Get the input object from the image pipeline.
NumberOfComponentsCallbackType GetNumberOfComponentsCallback() const
int GetDataScalarType()
Get the scalar type of the data.
virtual void Export(void *)
BufferPointerCallbackType GetBufferPointerCallback() const
PipelineModifiedCallbackType GetPipelineModifiedCallback() const
const char * GetDataScalarTypeAsString()
void * GetExportVoidPointer()
PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const
OriginCallbackType GetOriginCallback() const
virtual int NumberOfComponentsCallback()
virtual double * OriginCallback()
virtual double * SpacingCallback()
UpdateDataCallbackType GetUpdateDataCallback() const
static vtkImageExport * New()
ScalarTypeCallbackType GetScalarTypeCallback() const
SpacingCallbackType GetSpacingCallback() const
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int * WholeExtentCallback()
vtkIdType GetDataMemorySize()
Get the number of bytes required for the output C array.
void GetDataSpacing(double *ptr)
virtual void * BufferPointerCallback()
int * GetDataExtent()
Get miscellaneous additional information about the data.
void Export()
The main interface: update the pipeline and export the image to the memory pointed to by SetExportVoi...
int * GetDataDimensions()
void SetExportVoidPointer(void *)
Set the void pointer of the C array to export the data to.
virtual void UpdateDataCallback()
vtkMTimeType LastPipelineMTime
virtual void PropagateUpdateExtentCallback(int *)
virtual const char * ScalarTypeCallback()
void GetDataDimensions(int *ptr)
Get the (x,y,z) index dimensions of the data.
void GetDataExtent(int *ptr)
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()
virtual void UpdateInformationCallback()
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248