MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00010 //---------------------------------------------------------------------------------- 00011 00012 00013 #ifndef __mlLUTFPrimitive_H 00014 #define __mlLUTFPrimitive_H 00015 00016 // Local includes 00017 #ifndef __mlLUTSystem_H 00018 #include "mlLUTSystem.h" 00019 #endif 00020 #ifndef __mlLUTFunction_H 00021 #include "mlLUTFunction.h" 00022 #endif 00023 00024 00025 00026 ML_START_NAMESPACE 00027 00028 00030 class MLLUT_EXPORT LUTFPrimitive : public LUTFunction 00031 { 00032 public: 00033 00035 typedef enum { 00036 Ramp = 0, 00037 Wall, 00038 Gauss, 00039 Sigmoid, 00040 00041 numShapes 00042 } ShapeType; 00043 00045 static const char *shapeNames[numShapes]; 00046 00047 00049 LUTFPrimitive (void); 00050 00051 00053 00054 00056 virtual ShapeType getShape (void) const { return _shape; } 00057 00059 virtual void setShape (ShapeType shape) { _shape = shape; changed(); } 00060 00062 virtual double getCenter (void) const { return _center; } 00063 00065 virtual void setCenter (double center) { _center = center; changed(); } 00066 00068 virtual double getWidth (void) const { return _width; } 00069 00071 virtual void setWidth (double width) { _width = width; changed(); } 00072 00074 virtual double getEdgeWidth (void) const { return _edgeWidth; } 00075 00077 virtual void setEdgeWidth (double edgeWidth) { _edgeWidth = edgeWidth; changed(); } 00078 00080 virtual double getBaseValue (void) const { return _baseValue; } 00081 00083 virtual void setBaseValue (double baseValue) { _baseValue = baseValue; changed(); } 00084 00086 virtual double getPeakValue (void) const { return _peakValue; } 00087 00089 virtual void setPeakValue (double peakValue) { _peakValue = peakValue; changed(); } 00090 00092 00093 00095 00096 00098 virtual int getNativeMinIndex (void) const; 00099 00101 virtual int getNativeMaxIndex (void) const; 00102 00104 00105 00106 protected: 00107 00109 00110 00115 virtual bool renderLUTNative (LUTDataBase *lutData, LUTIteratorBase *lutIterator) const; 00116 00123 virtual bool renderLUTRescaled (LUTDataBase *lutData, LUTIteratorBase *lutIterator, 00124 double minIndex, double maxIndex) const; 00125 00129 template <typename T> 00130 bool renderLUT (LUTData<T> *lutData, LUTIterator<T> *lutIterator, double center, 00131 double width, double edgeWidth) const; 00132 00134 00135 00137 ShapeType _shape; 00138 00140 double _center; 00141 00143 double _width; 00144 00146 double _edgeWidth; 00147 00149 double _baseValue; 00150 00152 double _peakValue; 00153 00154 00155 00156 ML_CLASS_HEADER(LUTFPrimitive); 00157 00158 }; 00159 00160 00161 ML_END_NAMESPACE 00162 00163 00164 #endif 00165 // __mlLUTFPrimitive_H