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);};
58  void SetOutputScalarTypeToUnsignedInt()
59  {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
60  void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
61  void SetOutputScalarTypeToUnsignedLong()
62  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
63  void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
64  void SetOutputScalarTypeToUnsignedShort()
65  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
66  void SetOutputScalarTypeToUnsignedChar()
67  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
68  void SetOutputScalarTypeToChar()
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