Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkImageCast.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageCast.h,v $
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 =========================================================================*/
00047 #ifndef __vtkImageCast_h
00048 #define __vtkImageCast_h
00049 
00050 
00051 #include "vtkThreadedImageAlgorithm.h"
00052 
00053 class VTK_IMAGING_EXPORT vtkImageCast : public vtkThreadedImageAlgorithm
00054 {
00055 public:
00056   static vtkImageCast *New();
00057   vtkTypeRevisionMacro(vtkImageCast,vtkThreadedImageAlgorithm);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00062   vtkSetMacro(OutputScalarType,int);
00063   vtkGetMacro(OutputScalarType,int);
00064   void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
00065   void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
00066   void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
00067   void SetOutputScalarTypeToUnsignedInt()
00068     {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
00069   void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
00070   void SetOutputScalarTypeToUnsignedLong()
00071     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00072   void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
00073   void SetOutputScalarTypeToUnsignedShort()   
00074     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
00075   void SetOutputScalarTypeToUnsignedChar()
00076     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
00077   void SetOutputScalarTypeToChar()
00078     {this->SetOutputScalarType(VTK_CHAR);};
00080 
00082 
00085   vtkSetMacro(ClampOverflow, int);
00086   vtkGetMacro(ClampOverflow, int);
00087   vtkBooleanMacro(ClampOverflow, int);
00089   
00090   
00091 protected:
00092   vtkImageCast();
00093   ~vtkImageCast() {};
00094 
00095   int ClampOverflow;
00096   int OutputScalarType;
00097   void ExecuteInformation (vtkInformation *, vtkInformationVector *, vtkInformationVector *);
00098   
00099   void ThreadedExecute (vtkImageData *inData, vtkImageData *outData, 
00100                        int ext[6], int id);
00101 
00102 private:
00103   vtkImageCast(const vtkImageCast&);  // Not implemented.
00104   void operator=(const vtkImageCast&);  // Not implemented.
00105 };
00106 
00107 #endif
00108 
00109 
00110 
00111