00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00039 #ifndef __vtkImageColocalizationFilter_h
00040 #define __vtkImageColocalizationFilter_h
00041
00042 #include "vtkThreadedImageAlgorithm.h"
00043
00044
00045
00046 class VTK_IMAGING_EXPORT vtkImageColocalizationFilter : public vtkThreadedImageAlgorithm
00047 {
00048 public:
00049
00050 static vtkImageColocalizationFilter *New();
00051 vtkTypeRevisionMacro(vtkImageColocalizationFilter,vtkThreadedImageAlgorithm);
00052
00053 void PrintSelf(ostream& os, vtkIndent indent);
00054
00056
00061 vtkSetMacro(OutputDepth,int);
00062 vtkGetMacro(OutputDepth,int);
00063 void SetOutputDepthTo24Bit() { this->OutputDepth = 24; this->Modified(); }
00064 void SetOutputDepthTo8Bit() { this->OutputDepth = 8; this->Modified(); }
00065 void SetOutputDepthTo1Bit() { this->OutputDepth = 1; this->Modified(); }
00067
00069
00072 void SetColocalizationLowerThreshold(int dataset, int threshold);
00073 int GetColocalizationLowerThreshold(int dataset) {
00074 if (dataset < this->NumberOfDatasets) return ColocalizationLowerThresholds[dataset];
00075 return 0;
00076 }
00077
00078
00079
00080 void SetColocalizationUpperThreshold(int dataset, int threshold);
00081 int GetColocalizationUpperThreshold(int dataset) {
00082 if (dataset < this->NumberOfDatasets) return ColocalizationUpperThresholds[dataset];
00083 return 0;
00084 }
00085 int* GetColocalizationLowerThresholds() { return this->ColocalizationLowerThresholds; }
00086 int* GetColocalizationUpperThresholds() { return this->ColocalizationUpperThresholds; }
00088
00090
00092 vtkGetMacro(OutputScalarValue,double);
00093 vtkSetMacro(OutputScalarValue,double);
00095
00096 protected:
00097 vtkImageColocalizationFilter();
00098 ~vtkImageColocalizationFilter();
00099
00100
00101 virtual int RequestInformation (vtkInformation *, vtkInformationVector **,
00102 vtkInformationVector *);
00103
00104
00105
00106 void ThreadedRequestData (vtkInformation* request,
00107 vtkInformationVector** inputVector,
00108 vtkInformationVector* outputVector,
00109 vtkImageData ***inData, vtkImageData **outData,
00110 int ext[6], int id);
00111
00112
00113 virtual int FillInputPortInformation(int, vtkInformation*);
00114
00115 void InitOutput(int outExt[6], vtkImageData *outData);
00116 private:
00117 vtkImageColocalizationFilter(const vtkImageColocalizationFilter&);
00118 void operator=(const vtkImageColocalizationFilter&);
00119
00120 int OutputDepth;
00121 int *ColocalizationLowerThresholds;
00122 int *ColocalizationUpperThresholds;
00123 int NumberOfDatasets;
00124 double OutputScalarValue;
00125
00126 };
00127
00128 #endif
00129
00130
00131
00132