00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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&);
00174 void operator=(const vtkImageThresholdByPercentile&);
00175 };
00176
00177 #endif