VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Imaging/Core/vtkImageCast.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageCast.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00038 #ifndef vtkImageCast_h
00039 #define vtkImageCast_h
00040 
00041 
00042 #include "vtkImagingCoreModule.h" // For export macro
00043 #include "vtkThreadedImageAlgorithm.h"
00044 
00045 class VTKIMAGINGCORE_EXPORT vtkImageCast : public vtkThreadedImageAlgorithm
00046 {
00047 public:
00048   static vtkImageCast *New();
00049   vtkTypeMacro(vtkImageCast,vtkThreadedImageAlgorithm);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00054   vtkSetMacro(OutputScalarType,int);
00055   vtkGetMacro(OutputScalarType,int);
00056   void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
00057   void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
00058   void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
00059   void SetOutputScalarTypeToUnsignedInt()
00060     {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
00061   void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
00062   void SetOutputScalarTypeToUnsignedLong()
00063     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00064   void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
00065   void SetOutputScalarTypeToUnsignedShort()
00066     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
00067   void SetOutputScalarTypeToUnsignedChar()
00068     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
00069   void SetOutputScalarTypeToChar()
00070     {this->SetOutputScalarType(VTK_CHAR);};
00072 
00074 
00080   vtkSetMacro(ClampOverflow, int);
00081   vtkGetMacro(ClampOverflow, int);
00082   vtkBooleanMacro(ClampOverflow, int);
00084 
00085 
00086 protected:
00087   vtkImageCast();
00088   ~vtkImageCast() {}
00089 
00090   int ClampOverflow;
00091   int OutputScalarType;
00092   virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *);
00093 
00094   void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
00095                        int ext[6], int id);
00096 
00097 private:
00098   vtkImageCast(const vtkImageCast&);  // Not implemented.
00099   void operator=(const vtkImageCast&);  // Not implemented.
00100 };
00101 
00102 #endif
00103 
00104 
00105 
00106