| 99 | } |
| 100 | |
| 101 | void markMS2Locations_(PeakMap& exp, QImage& image, bool transpose, |
| 102 | QColor color, Size size) |
| 103 | { |
| 104 | double xcoef = image.width(), ycoef = image.height(); |
| 105 | if (transpose) |
| 106 | { |
| 107 | xcoef /= exp.getMaxRT() - exp.getMinRT(); |
| 108 | ycoef /= exp.getMaxMZ() - exp.getMinMZ(); |
| 109 | } |
| 110 | else |
| 111 | { |
| 112 | xcoef /= exp.getMaxMZ() - exp.getMinMZ(); |
| 113 | ycoef /= exp.getMaxRT() - exp.getMinRT(); |
| 114 | } |
| 115 | for (PeakMap::Iterator spec_iter = exp.begin(); |
| 116 | spec_iter != exp.end(); ++spec_iter) |
| 117 | { |
| 118 | if (spec_iter->getMSLevel() == 2) |
| 119 | { |
| 120 | double mz = spec_iter->getPrecursors()[0].getMZ(); |
| 121 | double rt = exp.getPrecursorSpectrum(spec_iter)->getRT(); |
| 122 | int x, y; |
| 123 | if (transpose) |
| 124 | { |
| 125 | x = int(xcoef * (rt - exp.getMinRT())); |
| 126 | y = int(ycoef * (exp.getMaxMZ() - mz)); |
| 127 | } |
| 128 | else |
| 129 | { |
| 130 | x = int(xcoef * (mz - exp.getMinMZ())); |
| 131 | y = int(ycoef * (exp.getMaxRT() - rt)); |
| 132 | } |
| 133 | addPoint_(x, y, image, color, size); //mark MS2 |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | void markFeatureLocations_(FeatureMap& feature_map, PeakMap& exp, QImage& image, bool transpose, QColor color) |
| 139 | { |
nothing calls this directly
no test coverage detected