Пример #1
0
 /** Returns a copy of the current object. */
 public DecoderSpecs getCopy() {
   DecoderSpecs decSpec2;
   try {
     decSpec2 = (DecoderSpecs) this.clone();
   } catch (CloneNotSupportedException e) {
     throw new Error("Cannot clone the DecoderSpecs instance");
   }
   // Quantization
   decSpec2.qts = (QuantTypeSpec) qts.getCopy();
   decSpec2.qsss = (QuantStepSizeSpec) qsss.getCopy();
   decSpec2.gbs = (GuardBitsSpec) gbs.getCopy();
   // Wavelet transform
   decSpec2.wfs = (SynWTFilterSpec) wfs.getCopy();
   decSpec2.dls = (IntegerSpec) dls.getCopy();
   // Component transformation
   decSpec2.cts = (CompTransfSpec) cts.getCopy();
   // ROI
   if (rois != null) {
     decSpec2.rois = (MaxShiftSpec) rois.getCopy();
   }
   return decSpec2;
 }
 /**
  * Returns true if given tile-component uses derived quantization step sizes.
  *
  * @param t Tile index
  * @param c Component index
  * @return True if derived
  */
 public boolean isDerived(int t, int c) {
   return qts.isDerived(t, c);
 }
 /**
  * Returns true if the quantized data is reversible, for the specified tile-component. For the
  * quantized data to be reversible it is necessary and sufficient that the quantization is
  * reversible.
  *
  * @param t The tile to test for reversibility
  * @param c The component to test for reversibility
  * @return True if the quantized data is reversible, false if not.
  */
 public boolean isReversible(int t, int c) {
   return qts.isReversible(t, c);
 }