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

vtkImageShiftScale.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageShiftScale.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 =========================================================================*/
00042 #ifndef __vtkImageShiftScale_h
00043 #define __vtkImageShiftScale_h
00044 
00045 
00046 #include "vtkThreadedImageAlgorithm.h"
00047 
00048 class VTK_IMAGING_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
00049 {
00050 public:
00051   static vtkImageShiftScale *New();
00052   vtkTypeRevisionMacro(vtkImageShiftScale,vtkThreadedImageAlgorithm);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00057   vtkSetMacro(Shift,double);
00058   vtkGetMacro(Shift,double);
00060 
00062 
00063   vtkSetMacro(Scale,double);
00064   vtkGetMacro(Scale,double);
00066 
00068 
00070   vtkSetMacro(OutputScalarType, int);
00071   vtkGetMacro(OutputScalarType, int);
00072   void SetOutputScalarTypeToDouble()
00073     {this->SetOutputScalarType(VTK_DOUBLE);}
00074   void SetOutputScalarTypeToFloat()
00075     {this->SetOutputScalarType(VTK_FLOAT);}
00076   void SetOutputScalarTypeToLong()
00077     {this->SetOutputScalarType(VTK_LONG);}
00078   void SetOutputScalarTypeToUnsignedLong()
00079     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00080   void SetOutputScalarTypeToInt()
00081     {this->SetOutputScalarType(VTK_INT);}
00082   void SetOutputScalarTypeToUnsignedInt()
00083     {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00084   void SetOutputScalarTypeToShort()
00085     {this->SetOutputScalarType(VTK_SHORT);}
00086   void SetOutputScalarTypeToUnsignedShort()
00087     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00088   void SetOutputScalarTypeToChar()
00089     {this->SetOutputScalarType(VTK_CHAR);}
00090   void SetOutputScalarTypeToUnsignedChar()
00091     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00093 
00095 
00098   vtkSetMacro(ClampOverflow, int);
00099   vtkGetMacro(ClampOverflow, int);
00100   vtkBooleanMacro(ClampOverflow, int);
00102   
00103 protected:
00104   vtkImageShiftScale();
00105   ~vtkImageShiftScale() {};
00106 
00107   double Shift;
00108   double Scale;
00109   int OutputScalarType;
00110   int ClampOverflow;
00111   
00112   void ExecuteInformation (vtkInformation *, vtkInformationVector *, vtkInformationVector *);
00113   
00114   void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
00115                        int extent[6], int id);
00116 private:
00117   vtkImageShiftScale(const vtkImageShiftScale&);  // Not implemented.
00118   void operator=(const vtkImageShiftScale&);  // Not implemented.
00119 };
00120 
00121 #endif
00122 
00123 
00124