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

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