/** * NOTE: Add option to specify XML vs. JSON... FITS vs. Entire header? * * @return void */ public function getJP2Header() { include_once HV_ROOT_DIR . '/../src/Database/ImgIndex.php'; include_once HV_ROOT_DIR . '/../src/Image/JPEG2000/JP2ImageXMLBox.php'; $imgIndex = new Database_ImgIndex(); $image = $imgIndex->getImageInformation($this->_params['id']); $filepath = HV_JP2_DIR . $image['filepath'] . '/' . $image['filename']; $xmlBox = new Image_JPEG2000_JP2ImageXMLBox($filepath, 'meta'); if (isset($this->_params['callback'])) { $this->_printJSON($xmlBox->getXMLString(), true); } else { $xmlBox->printXMLBox(); } }