/// <summary> Initializes the header writer with the references to the coding chain. /// /// </summary> /// <param name="origsrc">The original image data (before any component mixing, /// tiling, etc.) /// /// </param> /// <param name="isorigsig">An array specifying for each component if it was /// originally signed or not. /// /// </param> /// <param name="dwt">The discrete wavelet transform module. /// /// </param> /// <param name="tiler">The tiler module. /// /// </param> /// <param name="encSpec">The encoder specifications /// /// </param> /// <param name="roiSc">The ROI scaler module. /// /// </param> /// <param name="ralloc">The post compression rate allocator. /// /// </param> /// <param name="pl">ParameterList instance. /// /// </param> public HeaderEncoder(ImgData origsrc, bool[] isorigsig, ForwardWT dwt, Tiler tiler, EncoderSpecs encSpec, ROIScaler roiSc, PostCompRateAllocator ralloc, ParameterList pl) { pl.checkList(OPT_PREFIX, CSJ2K.j2k.util.ParameterList.toNameArray(pinfo)); if (origsrc.NumComps != isorigsig.Length) { throw new System.ArgumentException(); } this.origSrc = origsrc; this.isOrigSig = isorigsig; this.dwt = dwt; this.tiler = tiler; this.encSpec = encSpec; this.roiSc = roiSc; this.ralloc = ralloc; baos = new System.IO.MemoryStream(); //UPGRADE_TODO: Class 'java.io.DataOutputStream' was converted to 'System.IO.BinaryWriter' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioDataOutputStream'" hbuf = new CSJ2K.Util.EndianBinaryWriter(baos, true); nComp = origsrc.NumComps; enJJ2KMarkSeg = pl.getBooleanParameter("Hjj2000_COM"); otherCOMMarkSeg = pl.getParameter("HCOM"); }