VTK
vtkImageCast.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageCast.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=========================================================================*/
39#ifndef vtkImageCast_h
40#define vtkImageCast_h
41
42
43#include "vtkImagingCoreModule.h" // For export macro
45
46class VTKIMAGINGCORE_EXPORT vtkImageCast : public vtkThreadedImageAlgorithm
47{
48public:
49 static vtkImageCast *New();
51 void PrintSelf(ostream& os, vtkIndent indent);
52
54
57 vtkSetMacro(OutputScalarType,int);
58 vtkGetMacro(OutputScalarType,int);
59 void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
60 void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
61 void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
63 {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
64 void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
66 {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
67 void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
69 {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
71 {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
73 {this->SetOutputScalarType(VTK_CHAR);};
75
77
85 vtkSetMacro(ClampOverflow, int);
86 vtkGetMacro(ClampOverflow, int);
87 vtkBooleanMacro(ClampOverflow, int);
89
90
91protected:
94
98
99 void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
100 int ext[6], int id);
101
102private:
103 vtkImageCast(const vtkImageCast&) VTK_DELETE_FUNCTION;
104 void operator=(const vtkImageCast&) VTK_DELETE_FUNCTION;
105};
106
107#endif
108
109
110
111
Image Data type Casting Filter.
Definition: vtkImageCast.h:47
void SetOutputScalarTypeToLong()
Definition: vtkImageCast.h:64
void SetOutputScalarTypeToFloat()
Definition: vtkImageCast.h:59
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageCast.h:65
void SetOutputScalarTypeToDouble()
Definition: vtkImageCast.h:60
void SetOutputScalarTypeToShort()
Definition: vtkImageCast.h:67
static vtkImageCast * New()
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
int OutputScalarType
Definition: vtkImageCast.h:96
void SetOutputScalarTypeToChar()
Definition: vtkImageCast.h:72
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageCast.h:70
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int ext[6], int id)
void SetOutputScalarTypeToInt()
Definition: vtkImageCast.h:61
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageCast.h:68
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageCast.h:62
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_SHORT
Definition: vtkType.h:52
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
#define VTK_INT
Definition: vtkType.h:54
#define VTK_FLOAT
Definition: vtkType.h:58
#define VTK_CHAR
Definition: vtkType.h:49
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
#define VTK_LONG
Definition: vtkType.h:56