MCPcopy Create free account
hub / github.com/DOI-USGS/ISIS3 / fitsImageLabel

Method fitsImageLabel

isis/src/base/objs/ProcessImportFits/ProcessImportFits.cpp:259–281  ·  view source on GitHub ↗

* Supplies the FITS image label corresponding to the given index. Zero * returns the first label that precedes actual image data. Extra labels that * have no data can be accessed by calling extraFitsLabel(). * * @see extraFitsLabel() * * @param labelNumber The index to the FITS header image label. * * @return PvlGroup version of a FITS label corresponding to reques

Source from the content-addressed store, hash-verified

257 * @return PvlGroup version of a FITS label corresponding to requested label number.
258 */
259 PvlGroup ProcessImportFits::fitsImageLabel(int labelNumber) const {
260
261 if (labelNumber >= m_fitsImageLabels->size()) {
262 QString msg = QObject::tr("The requested label number [%1], from file [%2] is "
263 "past the last image group found in this FITS file. "
264 "Image label count is [%3]").arg(labelNumber).
265 arg(m_name.expanded()).arg(m_fitsImageLabels->size()-1);
266 throw IException(IException::User, msg, _FILEINFO_);
267 }
268
269 if (!m_fitsImageLabels) {
270 QString msg = QObject::tr("The FITS label has not been initialized, "
271 "call setFitsFile first.");
272 throw IException(IException::Programmer, msg, _FILEINFO_);
273 }
274 else if (m_fitsImageLabels->size() < labelNumber) {
275 QString msg = QObject::tr("The requested FITS label number "
276 "was not found in file [%1].").arg(m_name.toString());
277 throw IException(IException::Programmer, msg, _FILEINFO_);
278 }
279
280 return *(*m_fitsImageLabels)[labelNumber];
281 }
282
283
284 /**

Callers 7

lorri2isisFunction · 0.80
leisa2isisFunction · 0.80
mvic2isisFunction · 0.80
tagcams2isisFunction · 0.80
ocams2isisFunction · 0.80
fits2isisFunction · 0.80
hyb2onc2isisFunction · 0.80

Calls 4

IExceptionClass · 0.50
sizeMethod · 0.45
expandedMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected