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 =========================================================================*/
38 #ifndef vtkImageCast_h
39 #define vtkImageCast_h
40 
41 
42 #include "vtkImagingCoreModule.h" // For export macro
44 
46 {
47 public:
48  static vtkImageCast *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
54  vtkSetMacro(OutputScalarType,int);
55  vtkGetMacro(OutputScalarType,int);
56  void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
57  void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
58  void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
60  {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
61  void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
63  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
64  void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
66  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
68  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
70  {this->SetOutputScalarType(VTK_CHAR);};
72 
74 
80  vtkSetMacro(ClampOverflow, int);
81  vtkGetMacro(ClampOverflow, int);
82  vtkBooleanMacro(ClampOverflow, int);
84 
85 
86 protected:
87  vtkImageCast();
89 
93 
94  void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
95  int ext[6], int id);
96 
97 private:
98  vtkImageCast(const vtkImageCast&); // Not implemented.
99  void operator=(const vtkImageCast&); // Not implemented.
100 };
101 
102 #endif
103 
104 
105 
106 
Image Data type Casting Filter.
Definition: vtkImageCast.h:45
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
int OutputScalarType
Definition: vtkImageCast.h:91
virtual void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int threadId)
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
void SetOutputScalarTypeToInt()
Definition: vtkImageCast.h:58
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageCast.h:67
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_DOUBLE
Definition: vtkType.h:36
Generic filter that has one input..
#define VTK_FLOAT
Definition: vtkType.h:35
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_SHORT
Definition: vtkType.h:29
#define VTKIMAGINGCORE_EXPORT
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageCast.h:62
void SetOutputScalarTypeToDouble()
Definition: vtkImageCast.h:57
void SetOutputScalarTypeToShort()
Definition: vtkImageCast.h:64
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageCast.h:59
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageCast.h:65
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
void SetOutputScalarTypeToLong()
Definition: vtkImageCast.h:61
#define VTK_INT
Definition: vtkType.h:31
void SetOutputScalarTypeToFloat()
Definition: vtkImageCast.h:56
void SetOutputScalarTypeToChar()
Definition: vtkImageCast.h:69