/// <summary> /// <para>Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a copy of the internal data, therefore the returned data /// can be modified "in place".</para> /// /// <para>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' of /// the returned data is 0, and the 'scanw' is the same as the block's /// width. See the 'DataBlk' class.</para> /// /// <para>If the data array in 'blk' is 'null', then a new one is created. If /// the data array is not 'null' then it is reused, and it must be large /// enough to contain the block's data. Otherwise an 'ArrayStoreException' /// or an 'IndexOutOfBoundsException' is thrown by the Java system.</para> /// /// <para>The returned data has its 'progressive' attribute set to that of the /// input data.</para> /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to /// return. If it contains a non-null data array, then it must have the /// correct dimensions. If it contains a null data array a new one is /// created. The fields in this object are modified to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. Only 0 /// and 3 are valid. /// /// </param> /// <returns> The requested DataBlk /// </returns> /// <seealso cref="getInternCompData"> /// /// </seealso> public override DataBlk getCompData(DataBlk outblk, int c) { int type = outblk.DataType; double colors = Math.Pow(2, src.getNomRangeBits(c)); double bitoff = colors * 0.375D; if (type == DataBlk.TYPE_INT) { DataBlkInt intblk = (DataBlkInt)src.getInternCompData(outblk, c); for (int i = 0; i < intblk.data_array.Length; i++) { int tmp = intblk.data_array[i]; tmp += (int)(colors / 2); tmp -= (int)bitoff; tmp *= 2; tmp -= (int)(colors / 2); intblk.data_array[i] = tmp; } outblk = intblk; } else if (type == DataBlk.TYPE_FLOAT) { FacilityManager.getMsgLogger().printmsg(CSJ2K.j2k.util.MsgLogger_Fields.WARNING, "Unsupported e-sRGB DataType (float)"); DataBlkFloat fltblk = (DataBlkFloat)src.getInternCompData(outblk, c); outblk = fltblk; } return(outblk); }
/// <summary> Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a copy of the internal data, therefore the returned data /// can be modified "in place". /// /// <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' of /// the returned data is 0, and the 'scanw' is the same as the block's /// width. See the 'DataBlk' class. /// /// <P>If the data array in 'blk' is 'null', then a new one is created. If /// the data array is not 'null' then it is reused, and it must be large /// enough to contain the block's data. Otherwise an 'ArrayStoreException' /// or an 'IndexOutOfBoundsException' is thrown by the Java system. /// /// <P>The returned data has its 'progressive' attribute set to that of the /// input data. /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to /// return. If it contains a non-null data array, then it must have the /// correct dimensions. If it contains a null data array a new one is /// created. The fields in this object are modified to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. Only 0 /// and 3 are valid. /// /// </param> /// <returns> The requested DataBlk /// </returns> /// <seealso cref="getInternCompData"> /// /// </seealso> public override DataBlk getCompData(DataBlk outblk, int c) { int type = outblk.DataType; int i; // j removed // Calculate all components: for (i = 0; i < ncomps; ++i) { // Set up the working DataBlk geometry. copyGeometry(workInt[i], outblk); copyGeometry(workFloat[i], outblk); copyGeometry(inInt[i], outblk); copyGeometry(inFloat[i], outblk); // Request data from the source. inInt[i] = (DataBlkInt)src.getInternCompData(inInt[i], i); } if (type == DataBlk.TYPE_INT) { if (ncomps == 1) { workInt[c] = inInt[c]; } else { workInt = mult(inInt); } outblk.progressive = inInt[c].progressive; outblk.Data = workInt[c].Data; } if (type == DataBlk.TYPE_FLOAT) { if (ncomps == 1) { workFloat[c] = inFloat[c]; } else { workFloat = mult(inFloat); } outblk.progressive = inFloat[c].progressive; outblk.Data = workFloat[c].Data; } // Initialize the output block geometry and set the profiled // data into the output block. outblk.offset = 0; outblk.scanw = outblk.w; return(outblk); }
/// <summary> Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a reference to the internal data, if any, instead of as a /// copy, therefore the returned data should not be modified. /// /// <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' and /// 'scanw' of the returned data can be arbitrary. See the 'DataBlk' class. /// /// <P>This method, in general, is more efficient than the 'getCompData()' /// method since it may not copy the data. However if the array of returned /// data is to be modified by the caller then the other method is probably /// preferable. /// /// <P>If possible, the data in the returned 'DataBlk' should be the /// internal data itself, instead of a copy, in order to increase the data /// transfer efficiency. However, this depends on the particular /// implementation (it may be more convenient to just return a copy of the /// data). This is the reason why the returned data should not be modified. /// /// <P>If the data array in <tt>blk</tt> is <tt>null</tt>, then a new one /// is created if necessary. The implementation of this interface may /// choose to return the same array or a new one, depending on what is more /// efficient. Therefore, the data array in <tt>blk</tt> prior to the /// method call should not be considered to contain the returned data, a /// new array may have been created. Instead, get the array from /// <tt>blk</tt> after the method has returned. /// /// <P>The returned data may have its 'progressive' attribute set. In this /// case the returned data is only an approximation of the "final" data. /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to return, /// relative to the current tile. Some fields in this object are modified /// to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. /// /// </param> /// <returns> The requested DataBlk /// /// </returns> /// <seealso cref="getCompData"> /// </seealso> public override DataBlk getInternCompData(DataBlk out_Renamed, int c) { return getCompData(out_Renamed, c); }
/// <summary> Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a copy of the internal data, therefore the returned data /// can be modified "in place". /// /// <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' of /// the returned data is 0, and the 'scanw' is the same as the block's /// width. See the 'DataBlk' class. /// /// <P>If the data array in 'blk' is 'null', then a new one is created. If /// the data array is not 'null' then it is reused, and it must be large /// enough to contain the block's data. Otherwise an 'ArrayStoreException' /// or an 'IndexOutOfBoundsException' is thrown by the Java system. /// /// <P>The returned data has its 'progressive' attribute set to that of the /// input data. /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to /// return. If it contains a non-null data array, then it must have the /// correct dimensions. If it contains a null data array a new one is /// created. The fields in this object are modified to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. Only 0 /// and 3 are valid. /// /// </param> /// <returns> The requested DataBlk /// </returns> /// <seealso cref="getInternCompData"> /// /// </seealso> public override DataBlk getCompData(DataBlk outblk, int c) { int type = outblk.DataType; int i; // j removed // Calculate all components: for (i = 0; i < ncomps; ++i) { // Set up the working DataBlk geometry. copyGeometry(workInt[i], outblk); copyGeometry(workFloat[i], outblk); copyGeometry(inInt[i], outblk); copyGeometry(inFloat[i], outblk); // Request data from the source. inInt[i] = (DataBlkInt) src.getInternCompData(inInt[i], i); } if (type == DataBlk.TYPE_INT) { if (ncomps == 1) workInt[c] = inInt[c]; else workInt = mult(inInt); outblk.progressive = inInt[c].progressive; outblk.Data = workInt[c].Data; } if (type == DataBlk.TYPE_FLOAT) { if (ncomps == 1) workFloat[c] = inFloat[c]; else workFloat = mult(inFloat); outblk.progressive = inFloat[c].progressive; outblk.Data = workFloat[c].Data; } // Initialize the output block geometry and set the profiled // data into the output block. outblk.offset = 0; outblk.scanw = outblk.w; return outblk; }
/// <summary> Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a reference to the internal data, if any, instead of as a /// copy, therefore the returned data should not be modified. /// /// <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' and /// 'scanw' of the returned data can be arbitrary. See the 'DataBlk' class. /// /// <P>This method, in general, is more efficient than the 'getCompData()' /// method since it may not copy the data. However if the array of returned /// data is to be modified by the caller then the other method is probably /// preferable. /// /// <P>If possible, the data in the returned 'DataBlk' should be the /// internal data itself, instead of a copy, in order to increase the data /// transfer efficiency. However, this depends on the particular /// implementation (it may be more convenient to just return a copy of the /// data). This is the reason why the returned data should not be modified. /// /// <P>If the data array in <tt>blk</tt> is <tt>null</tt>, then a new one /// is created if necessary. The implementation of this interface may /// choose to return the same array or a new one, depending on what is more /// efficient. Therefore, the data array in <tt>blk</tt> prior to the /// method call should not be considered to contain the returned data, a /// new array may have been created. Instead, get the array from /// <tt>blk</tt> after the method has returned. /// /// <P>The returned data may have its 'progressive' attribute set. In this /// case the returned data is only an approximation of the "final" data. /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to return, /// relative to the current tile. Some fields in this object are modified /// to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. /// /// </param> /// <returns> The requested DataBlk /// /// </returns> /// <seealso cref="getCompData"> /// </seealso> public override DataBlk getInternCompData(DataBlk out_Renamed, int c) { return(getCompData(out_Renamed, c)); }
/// <summary> Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a copy of the internal data, therefore the returned data /// can be modified "in place". /// /// <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' of /// the returned data is 0, and the 'scanw' is the same as the block's /// width. See the 'DataBlk' class. /// /// <P>If the data array in 'blk' is 'null', then a new one is created. If /// the data array is not 'null' then it is reused, and it must be large /// enough to contain the block's data. Otherwise an 'ArrayStoreException' /// or an 'IndexOutOfBoundsException' is thrown by the Java system. /// /// <P>The returned data has its 'progressive' attribute set to that of the /// input data. /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to /// return. If it contains a non-null data array, then it must have the /// correct dimensions. If it contains a null data array a new one is /// created. The fields in this object are modified to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. Only 0 /// and 3 are valid. /// /// </param> /// <returns> The requested DataBlk /// /// </returns> /// <seealso cref="getInternCompData"> /// /// </seealso> public override DataBlk getCompData(DataBlk out_Renamed, int c) { return src.getCompData(out_Renamed, c); }
/// <summary> Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a copy of the internal data, therefore the returned data /// can be modified "in place". /// /// <P>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' of /// the returned data is 0, and the 'scanw' is the same as the block's /// width. See the 'DataBlk' class. /// /// <P>If the data array in 'blk' is 'null', then a new one is created. If /// the data array is not 'null' then it is reused, and it must be large /// enough to contain the block's data. Otherwise an 'ArrayStoreException' /// or an 'IndexOutOfBoundsException' is thrown by the Java system. /// /// <P>The returned data has its 'progressive' attribute set to that of the /// input data. /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to /// return. If it contains a non-null data array, then it must have the /// correct dimensions. If it contains a null data array a new one is /// created. The fields in this object are modified to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. Only 0 /// and 3 are valid. /// /// </param> /// <returns> The requested DataBlk /// /// </returns> /// <seealso cref="getInternCompData"> /// /// </seealso> public override DataBlk getCompData(DataBlk out_Renamed, int c) { return(src.getCompData(out_Renamed, c)); }
/// <summary> /// <para>Returns, in the blk argument, a block of image data containing the /// specifed rectangular area, in the specified component. The data is /// returned, as a copy of the internal data, therefore the returned data /// can be modified "in place".</para> /// /// <para>The rectangular area to return is specified by the 'ulx', 'uly', 'w' /// and 'h' members of the 'blk' argument, relative to the current /// tile. These members are not modified by this method. The 'offset' of /// the returned data is 0, and the 'scanw' is the same as the block's /// width. See the 'DataBlk' class.</para> /// /// <para>If the data array in 'blk' is 'null', then a new one is created. If /// the data array is not 'null' then it is reused, and it must be large /// enough to contain the block's data. Otherwise an 'ArrayStoreException' /// or an 'IndexOutOfBoundsException' is thrown by the Java system.</para> /// /// <para>The returned data has its 'progressive' attribute set to that of the /// input data.</para> /// /// </summary> /// <param name="blk">Its coordinates and dimensions specify the area to /// return. If it contains a non-null data array, then it must have the /// correct dimensions. If it contains a null data array a new one is /// created. The fields in this object are modified to return the data. /// /// </param> /// <param name="c">The index of the component from which to get the data. Only 0 /// and 3 are valid. /// /// </param> /// <returns> The requested DataBlk /// </returns> /// <seealso cref="getInternCompData"> /// /// </seealso> public override DataBlk getCompData(DataBlk outblk, int c) { int type = outblk.DataType; double colors = Math.Pow(2, src.getNomRangeBits(c)); double bitoff=colors*0.375D; if (type == DataBlk.TYPE_INT) { DataBlkInt intblk=(DataBlkInt)src.getInternCompData(outblk, c); for (int i = 0; i < intblk.data_array.Length; i++) { int tmp = intblk.data_array[i]; tmp += (int)(colors / 2); tmp -= (int)bitoff; tmp *= 2; tmp -= (int)(colors / 2); intblk.data_array[i] = tmp; } outblk = intblk; } else if (type == DataBlk.TYPE_FLOAT) { FacilityManager.getMsgLogger().printmsg(CSJ2K.j2k.util.MsgLogger_Fields.WARNING, "Unsupported e-sRGB DataType (float)"); DataBlkFloat fltblk = (DataBlkFloat)src.getInternCompData(outblk, c); outblk = fltblk; } return outblk; }
public abstract CSJ2K.j2k.image.DataBlk getInternCodeBlock(int param1, int param2, int param3, CSJ2K.j2k.wavelet.synthesis.SubbandSyn param4, CSJ2K.j2k.image.DataBlk param5);
public abstract CSJ2K.j2k.image.DataBlk getCompData(CSJ2K.j2k.image.DataBlk param1, int param2);