/**
  * Constructor
  *
  * @param string $jp2           Original JP2 image from which the subfield
  *                              should be derrived
  * @param string $filepath      Location to output the file to
  * @param array  $roi           Subfield region of interest in pixels
  * @param array  $uiLabels      Datasource label hierarchy
  * @param float  $offsetX       Offset of the sun center from image center
  * @param float  $offsetY       Offset of the sun center from image center
  */
 public function __construct($jp2, $filepath, $roi, $uiLabels, $offsetX, $offsetY, $options)
 {
     // Default options
     $defaults = array('date' => '', 'compress' => true, 'layeringOrder' => 1, 'opacity' => 100, 'palettedJP2' => false);
     $this->options = array_replace($defaults, $options);
     $this->uiLabels = $uiLabels;
     $this->filepath = $filepath;
     $imageSettings = array('opacity' => $this->options['opacity']);
     parent::__construct($jp2, $roi, $this->filepath, $offsetX, $offsetY, $imageSettings);
     $padding = $this->computePadding($roi);
     $this->setPadding($padding);
     if (HV_DISABLE_CACHE || $this->_imageNotInCache()) {
         $this->build();
     }
 }
示例#2
0
 /**
  * Creates a new blank image
  *
  * @param string $jp2      Source JP2 image
  * @param string $filepath Location to output the file to
  * @param array  $roi      Top-left and bottom-right pixel coordinates on the image
  * @param array  $uiLabels Datasource label hierarchy
  * @param int    $offsetX  Offset of the sun center from the image center
  * @param int    $offsetY  Offset of the sun center from the iamge center
  * @param array  $options  Optional parameters
  */
 public function __construct($jp2, $filepath, $roi, $uiLabels, $offsetX, $offsetY, $options)
 {
     parent::__construct($jp2, $filepath, $roi, $uiLabels, $offsetX, $offsetY, $options);
 }