VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Imaging/Core/vtkImageShiftScale.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageShiftScale.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 =========================================================================*/
00030 #ifndef vtkImageShiftScale_h
00031 #define vtkImageShiftScale_h
00032 
00033 
00034 #include "vtkImagingCoreModule.h" // For export macro
00035 #include "vtkThreadedImageAlgorithm.h"
00036 
00037 class VTKIMAGINGCORE_EXPORT vtkImageShiftScale : public vtkThreadedImageAlgorithm
00038 {
00039 public:
00040   static vtkImageShiftScale *New();
00041   vtkTypeMacro(vtkImageShiftScale,vtkThreadedImageAlgorithm);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00046   vtkSetMacro(Shift,double);
00047   vtkGetMacro(Shift,double);
00049 
00051 
00052   vtkSetMacro(Scale,double);
00053   vtkGetMacro(Scale,double);
00055 
00057 
00059   vtkSetMacro(OutputScalarType, int);
00060   vtkGetMacro(OutputScalarType, int);
00061   void SetOutputScalarTypeToDouble()
00062     {this->SetOutputScalarType(VTK_DOUBLE);}
00063   void SetOutputScalarTypeToFloat()
00064     {this->SetOutputScalarType(VTK_FLOAT);}
00065   void SetOutputScalarTypeToLong()
00066     {this->SetOutputScalarType(VTK_LONG);}
00067   void SetOutputScalarTypeToUnsignedLong()
00068     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00069   void SetOutputScalarTypeToInt()
00070     {this->SetOutputScalarType(VTK_INT);}
00071   void SetOutputScalarTypeToUnsignedInt()
00072     {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00073   void SetOutputScalarTypeToShort()
00074     {this->SetOutputScalarType(VTK_SHORT);}
00075   void SetOutputScalarTypeToUnsignedShort()
00076     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00077   void SetOutputScalarTypeToChar()
00078     {this->SetOutputScalarType(VTK_CHAR);}
00079   void SetOutputScalarTypeToUnsignedChar()
00080     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00082 
00084 
00090   vtkSetMacro(ClampOverflow, int);
00091   vtkGetMacro(ClampOverflow, int);
00092   vtkBooleanMacro(ClampOverflow, int);
00094 
00095 protected:
00096   vtkImageShiftScale();
00097   ~vtkImageShiftScale();
00098 
00099   double Shift;
00100   double Scale;
00101   int OutputScalarType;
00102   int ClampOverflow;
00103 
00104   virtual int RequestInformation(vtkInformation*,
00105                                  vtkInformationVector**,
00106                                  vtkInformationVector*);
00107 
00108   virtual void ThreadedRequestData(vtkInformation*,
00109                                    vtkInformationVector**,
00110                                    vtkInformationVector*,
00111                                    vtkImageData*** inData,
00112                                    vtkImageData** outData,
00113                                    int outExt[6],
00114                                    int threadId);
00115 private:
00116   vtkImageShiftScale(const vtkImageShiftScale&);  // Not implemented.
00117   void operator=(const vtkImageShiftScale&);  // Not implemented.
00118 };
00119 
00120 #endif