VTK
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 
00087   vtkSetMacro(ClampOverflow, int);
00088   vtkGetMacro(ClampOverflow, int);
00089   vtkBooleanMacro(ClampOverflow, int);
00091 
00092 protected:
00093   vtkImageShiftScale();
00094   ~vtkImageShiftScale();
00095 
00096   double Shift;
00097   double Scale;
00098   int OutputScalarType;
00099   int ClampOverflow;
00100 
00101   virtual int RequestInformation(vtkInformation*,
00102                                  vtkInformationVector**,
00103                                  vtkInformationVector*);
00104 
00105   virtual void ThreadedRequestData(vtkInformation*,
00106                                    vtkInformationVector**,
00107                                    vtkInformationVector*,
00108                                    vtkImageData*** inData,
00109                                    vtkImageData** outData,
00110                                    int outExt[6],
00111                                    int threadId);
00112 private:
00113   vtkImageShiftScale(const vtkImageShiftScale&);  // Not implemented.
00114   void operator=(const vtkImageShiftScale&);  // Not implemented.
00115 };
00116 
00117 #endif