• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Imaging/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 =========================================================================*/
00030 #ifndef __vtkImageCast_h
00031 #define __vtkImageCast_h
00032 
00033 
00034 #include "vtkThreadedImageAlgorithm.h"
00035 
00036 class VTK_IMAGING_EXPORT vtkImageCast : public vtkThreadedImageAlgorithm
00037 {
00038 public:
00039   static vtkImageCast *New();
00040   vtkTypeRevisionMacro(vtkImageCast,vtkThreadedImageAlgorithm);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044 
00045   vtkSetMacro(OutputScalarType,int);
00046   vtkGetMacro(OutputScalarType,int);
00047   void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
00048   void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
00049   void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
00050   void SetOutputScalarTypeToUnsignedInt()
00051     {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
00052   void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
00053   void SetOutputScalarTypeToUnsignedLong()
00054     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00055   void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
00056   void SetOutputScalarTypeToUnsignedShort()
00057     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
00058   void SetOutputScalarTypeToUnsignedChar()
00059     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
00060   void SetOutputScalarTypeToChar()
00061     {this->SetOutputScalarType(VTK_CHAR);};
00063 
00065 
00068   vtkSetMacro(ClampOverflow, int);
00069   vtkGetMacro(ClampOverflow, int);
00070   vtkBooleanMacro(ClampOverflow, int);
00072   
00073   
00074 protected:
00075   vtkImageCast();
00076   ~vtkImageCast() {};
00077 
00078   int ClampOverflow;
00079   int OutputScalarType;
00080   virtual int RequestInformation (vtkInformation *, vtkInformationVector**, vtkInformationVector *);
00081   
00082   void ThreadedExecute (vtkImageData *inData, vtkImageData *outData, 
00083                        int ext[6], int id);
00084 
00085 private:
00086   vtkImageCast(const vtkImageCast&);  // Not implemented.
00087   void operator=(const vtkImageCast&);  // Not implemented.
00088 };
00089 
00090 #endif
00091 
00092 
00093 
00094 

Generated by  doxygen 1.7.1