comparison layer/SliceLayer.h @ 198:c2ed5014d4ff

* Scale fixes and feature descriptions in slice layer
author Chris Cannam
date Thu, 01 Feb 2007 16:54:42 +0000
parents 6b023411087b
children 45e995ed84d9
comparison
equal deleted inserted replaced
197:6b023411087b 198:c2ed5014d4ff
38 virtual const Model *getModel() const { return 0; } 38 virtual const Model *getModel() const { return 0; }
39 39
40 void setSliceableModel(const Model *model); 40 void setSliceableModel(const Model *model);
41 41
42 virtual void paint(View *v, QPainter &paint, QRect rect) const; 42 virtual void paint(View *v, QPainter &paint, QRect rect) const;
43
44 virtual QString getFeatureDescription(View *v, QPoint &) const;
43 45
44 virtual int getVerticalScaleWidth(View *v, QPainter &) const; 46 virtual int getVerticalScaleWidth(View *v, QPainter &) const;
45 virtual void paintVerticalScale(View *v, QPainter &paint, QRect rect) const; 47 virtual void paintVerticalScale(View *v, QPainter &paint, QRect rect) const;
46 48
47 virtual PropertyList getProperties() const; 49 virtual PropertyList getProperties() const;
99 public slots: 101 public slots:
100 void sliceableModelReplaced(const Model *, const Model *); 102 void sliceableModelReplaced(const Model *, const Model *);
101 void modelAboutToBeDeleted(Model *); 103 void modelAboutToBeDeleted(Model *);
102 104
103 protected: 105 protected:
106 float getXForBin(int bin, int totalBins, float w) const;
107 int getBinForX(float x, int totalBins, float w) const;
108
104 const DenseThreeDimensionalModel *m_sliceableModel; 109 const DenseThreeDimensionalModel *m_sliceableModel;
105 QColor m_colour; 110 QColor m_colour;
106 int m_colourMap; 111 int m_colourMap;
107 EnergyScale m_energyScale; 112 EnergyScale m_energyScale;
108 SamplingMode m_samplingMode; 113 SamplingMode m_samplingMode;
110 BinScale m_binScale; 115 BinScale m_binScale;
111 bool m_normalize; 116 bool m_normalize;
112 bool m_bias; 117 bool m_bias;
113 float m_gain; 118 float m_gain;
114 mutable std::vector<int> m_scalePoints; 119 mutable std::vector<int> m_scalePoints;
120 mutable std::map<View *, int> m_xorigins;
121 mutable size_t m_currentf0;
122 mutable size_t m_currentf1;
123 mutable std::vector<float> m_values;
115 }; 124 };
116 125
117 #endif 126 #endif