19 #ifndef ATOMPROBE_MULTIRANGE_H 20 #define ATOMPROBE_MULTIRANGE_H 67 std::vector<std::string> ionNames;
73 std::vector<std::set<SIMPLE_SPECIES> > moleculeData;
76 std::vector<RGBf> colours;
80 std::vector<std::pair<float,float> > ranges;
85 std::vector<unsigned int> rangeGrouping;
88 std::vector<unsigned int> ionIDs;
92 unsigned int errState;
107 unsigned int addIon(
const std::set<SIMPLE_SPECIES> &molecule,
108 const std::string &name,
const RGBf &ionCol);
113 const std::string &name,
const RGBf &ionCol);
119 unsigned int addRange(
float start,
float end,
unsigned int ionID);
122 unsigned int addRange(
const std::pair<float, float> &rng,
unsigned int ionID);
133 void setRangeGroups(
const std::vector<unsigned int> &groups);
145 bool open(
const char *fileName,
unsigned int format=-1);
151 unsigned int getIonID(
unsigned int rangeId)
const;
154 void setIonID(
unsigned int range,
unsigned int newIonId);
157 RGBf getColour(
unsigned int ionID)
const;
159 void setColour(
unsigned int ionID,
const RGBf &r);
162 std::string getErrString()
const;
165 std::string getIonName(
unsigned int ionID)
const;
168 unsigned int getNumRanges()
const;
171 unsigned int getNumRanges(
unsigned int ionID)
const;
174 unsigned int getNumIons()
const;
177 std::set<SIMPLE_SPECIES> getMolecule(
unsigned int ionID)
const;
181 std::pair<float,float> getRange(
unsigned int rangeID)
const;
184 std::vector<unsigned int> getRanges(
float mass)
const;
188 bool isRanged(
float mass)
const;
190 bool isRanged(
const IonHit &)
const;
193 void range(std::vector<IonHit> &ionHits)
const;
196 bool isSelfConsistent()
const;
206 void flattenToMassAxis(std::vector<FLATTENED_RANGE> &ionMapping,
float tolerance=0)
const;
212 void splitOverlapping(std::vector<MultiRange> &decomposedRanges,
float massTolerance=0)
const;
218 void copyDataFromRange(
const MultiRange &src,
unsigned int srcRngId);
unsigned int atomicNumber
Number of protons (element number)
bool operator<(const SIMPLE_SPECIES &a, const SIMPLE_SPECIES &b)
Data holder for colour as float.
Data storage and retrieval class for "ranging" a spectra, where overlapping ranges are permitted...
bool operator==(const SIMPLE_SPECIES &oth) const
Class to load abundance information for natural isotopes.
Structure that allows for the multirange data to be mapped into.
This is a data holding class for POS file ions, from.
Data storage and retrieval class for various range files.
unsigned int count
Number of copies of this isotope.
std::vector< unsigned int > containedRangeIDs