dox/Imaging/vtkImageThresholdByPercentile.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   vtkCNMRRLibrary
00004   Module:    $RCSfile: vtkImageThresholdByPercentile.h,v $
00005 
00006   Copyright  2006  The Pennsylvania State University
00007   
00008           Notice
00009  
00010   The contents of this file are subject to The Pennsylvania State University 
00011   Open Source License (the "License"); you may not use this file except in 
00012   compliance with the License. You may obtain a copy of the License at H066 
00013   Radiology, NMR Building, 500 University Drive, Hershey, PA, 
00014   tel. (717) 531-6069 or via email at dcb210@psu.edu.
00015  
00016   Software distributed under the License is distributed on an "AS IS" basis, 
00017   WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
00018   for the specific language governing rights and limitations under the 
00019   License.
00020  
00021   The Original Code is listed under Exhibit A of the license.
00022  
00023   The Initial Developer of the Original Code is Don Bigler.
00024  
00025   Contributor(s):
00026   
00027 =========================================================================*/
00041 #ifndef __vtkImageThresholdByPercentile_h
00042 #define __vtkImageThresholdByPercentile_h
00043 
00044 #include "vtkSimpleImageToImageFilter.h"
00045 #include "vtkCNMRRImagingWin32Header.h"
00046 
00047 class VTK_CNMRR_IMAGING_EXPORT vtkImageThresholdByPercentile : public vtkSimpleImageToImageFilter
00048 {
00049    public:
00050       static vtkImageThresholdByPercentile *New();
00051       vtkTypeRevisionMacro(vtkImageThresholdByPercentile,vtkSimpleImageToImageFilter);
00052    
00054 
00056       vtkSetMacro(Dimensionality,int);
00057       vtkGetMacro(Dimensionality,int);
00059          
00061 
00065       vtkSetMacro(UpperPercentile,double);
00066       vtkGetMacro(UpperPercentile,double);
00068       
00070 
00074       vtkSetMacro(LowerPercentile,double);
00075       vtkGetMacro(LowerPercentile,double);
00077       
00079 
00081       vtkSetMacro(ScalingFactor,double);
00082       vtkGetMacro(ScalingFactor,double);
00084       
00086 
00088       vtkSetMacro(ReplaceIn, int);
00089       vtkGetMacro(ReplaceIn, int);
00090       vtkBooleanMacro(ReplaceIn, int);
00092       
00094 
00095       void SetInValue(double val);
00096       vtkGetMacro(InValue, double);
00098       
00100 
00102       vtkSetMacro(ReplaceOut, int);
00103       vtkGetMacro(ReplaceOut, int);
00104       vtkBooleanMacro(ReplaceOut, int);
00106       
00108 
00109       void SetOutValue(double val);
00110       vtkGetMacro(OutValue, double);
00112       
00114 
00115       vtkSetMacro(OutputScalarType, int);
00116       vtkGetMacro(OutputScalarType, int);
00117       void SetOutputScalarTypeToDouble()
00118       {this->SetOutputScalarType(VTK_DOUBLE);}
00119       void SetOutputScalarTypeToFloat()
00120       {this->SetOutputScalarType(VTK_FLOAT);}
00121       void SetOutputScalarTypeToLong()
00122       {this->SetOutputScalarType(VTK_LONG);}
00123       void SetOutputScalarTypeToUnsignedLong()
00124       {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
00125       void SetOutputScalarTypeToInt()
00126       {this->SetOutputScalarType(VTK_INT);}
00127       void SetOutputScalarTypeToUnsignedInt()
00128       {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
00129       void SetOutputScalarTypeToShort()
00130       {this->SetOutputScalarType(VTK_SHORT);}
00131       void SetOutputScalarTypeToUnsignedShort()
00132       {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
00133       void SetOutputScalarTypeToChar()
00134       {this->SetOutputScalarType(VTK_CHAR);}
00135       void SetOutputScalarTypeToSignedChar()
00136       {this->SetOutputScalarType(VTK_SIGNED_CHAR);}
00137       void SetOutputScalarTypeToUnsignedChar()
00138       {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
00140       
00142 
00146       void SetShiftDataByThreshodValue(int val);
00147       vtkGetMacro(ShiftDataByThreshodValue, int);
00148       vtkBooleanMacro(ShiftDataByThreshodValue, int);
00150 
00151    protected:
00152 
00153       vtkImageThresholdByPercentile();
00154       ~vtkImageThresholdByPercentile(){};
00155          
00156       double UpperPercentile;
00157       double LowerPercentile;
00158       double ScalingFactor;
00159       int ReplaceIn;
00160       double InValue;
00161       int ReplaceOut;
00162       double OutValue;
00163       int ShiftDataByThreshodValue;
00164       
00165       int OutputScalarType;
00166       int Dimensionality;
00167       
00168       virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00169 
00170       virtual void SimpleExecute(vtkImageData* input, vtkImageData* output);
00171    
00172    private:
00173       vtkImageThresholdByPercentile(const vtkImageThresholdByPercentile&);  // Not implemented.
00174       void operator=(const vtkImageThresholdByPercentile&);  // Not implemented.
00175 };
00176 
00177 #endif

Generated on Tue May 12 14:53:03 2009 for vtkCNMRRLibrary by  doxygen 1.4.7