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

Imaging/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 =========================================================================*/
00030 #ifndef __vtkImageShiftScale_h
00031 #define __vtkImageShiftScale_h
00032 
00033 
00034 #include "vtkImageToImageFilter.h"
00035 
00036 class VTK_IMAGING_EXPORT vtkImageShiftScale : public vtkImageToImageFilter
00037 {
00038 public:
00039   static vtkImageShiftScale *New();
00040   vtkTypeRevisionMacro(vtkImageShiftScale,vtkImageToImageFilter);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044 
00045   vtkSetMacro(Shift,double);
00046   vtkGetMacro(Shift,double);
00048 
00050 
00051   vtkSetMacro(Scale,double);
00052   vtkGetMacro(Scale,double);
00054 
00056 
00058   vtkSetMacro(OutputScalarType, int);
00059   vtkGetMacro(OutputScalarType, int);
00060   void SetOutputScalarTypeToDouble()
00061     {this->SetOutputScalarType(VTK_DOUBLE);}
00062   void SetOutputScalarTypeToFloat()
00063     {this->SetOutputScalarType(VTK_FLOAT);}
00064   void SetOutputScalarTypeToLong()
00065     {this->SetOutputScalarType(VTK_LONG);}
00066   void SetOutputScalarTypeToUnsignedLong()
00067     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00068   void SetOutputScalarTypeToInt()
00069     {this->SetOutputScalarType(VTK_INT);}
00070   void SetOutputScalarTypeToUnsignedInt()
00071     {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00072   void SetOutputScalarTypeToShort()
00073     {this->SetOutputScalarType(VTK_SHORT);}
00074   void SetOutputScalarTypeToUnsignedShort()
00075     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00076   void SetOutputScalarTypeToChar()
00077     {this->SetOutputScalarType(VTK_CHAR);}
00078   void SetOutputScalarTypeToUnsignedChar()
00079     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00081 
00083 
00086   vtkSetMacro(ClampOverflow, int);
00087   vtkGetMacro(ClampOverflow, int);
00088   vtkBooleanMacro(ClampOverflow, int);
00090   
00091 protected:
00092   vtkImageShiftScale();
00093   ~vtkImageShiftScale() {};
00094 
00095   double Shift;
00096   double Scale;
00097   int OutputScalarType;
00098   int ClampOverflow;
00099   
00100   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00101   void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
00102   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
00103                        int extent[6], int id);
00104 private:
00105   vtkImageShiftScale(const vtkImageShiftScale&);  // Not implemented.
00106   void operator=(const vtkImageShiftScale&);  // Not implemented.
00107 };
00108 
00109 #endif
00110 
00111 
00112