VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
45 class VTKIMAGINGCORE_EXPORT vtkImageCast : public vtkThreadedImageAlgorithm
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 
77  vtkSetMacro(ClampOverflow, int);
78  vtkGetMacro(ClampOverflow, int);
79  vtkBooleanMacro(ClampOverflow, int);
81 
82 
83 protected:
84  vtkImageCast();
86 
87  int ClampOverflow;
89  virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *);
90 
91  void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
92  int ext[6], int id);
93 
94 private:
95  vtkImageCast(const vtkImageCast&); // Not implemented.
96  void operator=(const vtkImageCast&); // Not implemented.
97 };
98 
99 #endif
100 
101 
102 
103 
Image Data type Casting Filter.
Definition: vtkImageCast.h:45
int OutputScalarType
Definition: vtkImageCast.h:88
virtual void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int threadId)
void SetOutputScalarTypeToInt()
Definition: vtkImageCast.h:58
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageCast.h:67
void PrintSelf(ostream &os, vtkIndent indent)
Generic filter that has one input..
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageCast.h:62
void SetOutputScalarTypeToDouble()
Definition: vtkImageCast.h:57
void SetOutputScalarTypeToShort()
Definition: vtkImageCast.h:64
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageCast.h:59
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageCast.h:65
static vtkAlgorithm * New()
void SetOutputScalarTypeToLong()
Definition: vtkImageCast.h:61
void SetOutputScalarTypeToFloat()
Definition: vtkImageCast.h:56
void SetOutputScalarTypeToChar()
Definition: vtkImageCast.h:69