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 
43 
45 {
46 public:
47  static vtkImageCast *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
53  vtkSetMacro(OutputScalarType,int);
54  vtkGetMacro(OutputScalarType,int);
55  void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
56  void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
57  void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
59  {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
60  void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
62  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
63  void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
65  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
67  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
69  {this->SetOutputScalarType(VTK_CHAR);};
71 
73 
76  vtkSetMacro(ClampOverflow, int);
77  vtkGetMacro(ClampOverflow, int);
78  vtkBooleanMacro(ClampOverflow, int);
80 
81 
82 protected:
83  vtkImageCast();
85 
86  int ClampOverflow;
89 
90  void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
91  int ext[6], int id);
92 
93 private:
94  vtkImageCast(const vtkImageCast&); // Not implemented.
95  void operator=(const vtkImageCast&); // Not implemented.
96 };
97 
98 #endif
99 
100 
101 
102 
Image Data type Casting Filter.
Definition: vtkImageCast.h:44
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
int OutputScalarType
Definition: vtkImageCast.h:87
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:57
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageCast.h:66
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:37
#define VTK_IMAGING_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_SHORT
Definition: vtkType.h:29
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageCast.h:61
void SetOutputScalarTypeToDouble()
Definition: vtkImageCast.h:56
void SetOutputScalarTypeToShort()
Definition: vtkImageCast.h:63
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageCast.h:58
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageCast.h:64
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
void SetOutputScalarTypeToLong()
Definition: vtkImageCast.h:60
#define VTK_INT
Definition: vtkType.h:31
void SetOutputScalarTypeToFloat()
Definition: vtkImageCast.h:55
void SetOutputScalarTypeToChar()
Definition: vtkImageCast.h:68