/// <summary> Returns the precinct partition width in component 'n' and tile 't' at /// resolution level 'rl'. If the tile index is equal to -1 or if the /// component index is equal to -1 it means that those should not be taken /// into account. /// /// </summary> /// <param name="t">The tile index, in raster scan order. Specify -1 if it is not /// a specific tile. /// /// </param> /// <param name="c">The component index. Specify -1 if it is not a specific /// component. /// /// </param> /// <param name="rl">The resolution level /// /// </param> /// <returns> The precinct partition width in component 'c' and tile 't' at /// resolution level 'rl'. /// /// </returns> public virtual int getPPX(int t, int c, int rl) { int mrl, idx; System.Collections.ArrayList[] v = null; bool tileSpecified = (t != -1?true:false); bool compSpecified = (c != -1?true:false); // Get the maximum number of decomposition levels and the object // (Vector array) containing the precinct dimensions (width and // height) for the specified (or not) tile/component if (tileSpecified && compSpecified) { mrl = ((System.Int32)dls.getTileCompVal(t, c)); v = (System.Collections.ArrayList[])getTileCompVal(t, c); } else if (tileSpecified && !compSpecified) { mrl = ((System.Int32)dls.getTileDef(t)); v = (System.Collections.ArrayList[])getTileDef(t); } else if (!tileSpecified && compSpecified) { mrl = ((System.Int32)dls.getCompDef(c)); v = (System.Collections.ArrayList[])getCompDef(c); } else { mrl = ((System.Int32)dls.getDefault()); v = (System.Collections.ArrayList[])getDefault(); } idx = mrl - rl; if (v[0].Count > idx) { return((System.Int32)v[0][idx]); } else { return((System.Int32)v[0][v[0].Count - 1]); } }
/// <summary> Returns the number of decomposition levels that are applied to the LL /// band, in the specified tile-component. A value of 0 means that no /// wavelet transform is applied. /// /// </summary> /// <param name="t">The tile index /// /// </param> /// <param name="c">The index of the component. /// /// </param> /// <returns> The number of decompositions applied to the LL band (0 for no /// wavelet transform). /// /// </returns> public override int getDecompLevels(int t, int c) { return((System.Int32)dls.getTileCompVal(t, c)); }