/// <summary> public constructor which takes in the image, parameterlist and the /// image header decoder as args. /// </summary> /// <param name="in">input RandomAccess image file. /// </param> /// <param name="hd">provides information about the image header. /// </param> /// <param name="pl">provides parameters from the default and commandline lists. /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public ColorSpace(RandomAccessIO in_Renamed, HeaderDecoder hd, ParameterList pl) { this.pl = pl; this.in_Renamed = in_Renamed; this.hd = hd; getBoxes(); }
/// <summary> Construct a JP2Box from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public JP2Box(RandomAccessIO in_Renamed, int boxStart) { byte[] boxHeader = new byte[16]; this.in_Renamed = in_Renamed; this.boxStart = boxStart; this.in_Renamed.seek(this.boxStart); this.in_Renamed.readFully(boxHeader, 0, 8); this.dataStart = boxStart + 8; this.length = ICCProfile.getInt(boxHeader, 0); this.boxEnd = boxStart + length; if (length == 1) throw new ColorSpaceException("extended length boxes not supported"); }
/// <summary> Construct a JP2Box from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public JP2Box(RandomAccessIO in_Renamed, int boxStart) { byte[] boxHeader = new byte[16]; this.in_Renamed = in_Renamed; this.boxStart = boxStart; this.in_Renamed.seek(this.boxStart); this.in_Renamed.readFully(boxHeader, 0, 8); this.dataStart = boxStart + 8; this.length = ICCProfile.getInt(boxHeader, 0); this.boxEnd = boxStart + length; if (length == 1) { throw new ColorSpaceException("extended length boxes not supported"); } }
/// <summary> Construct a ChannelDefinitionBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public ChannelDefinitionBox(RandomAccessIO in_Renamed, int boxStart) : base(in_Renamed, boxStart) { readBox(); }
/// <summary> Construct a PaletteBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public PaletteBox(RandomAccessIO in_Renamed, int boxStart):base(in_Renamed, boxStart) { readBox(); }
/// <summary> Construct a ComponentMappingBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public ComponentMappingBox(RandomAccessIO in_Renamed, int boxStart):base(in_Renamed, boxStart) { readBox(); }
/// <summary> Construct an ImageHeaderBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public ImageHeaderBox(RandomAccessIO in_Renamed, int boxStart) : base(in_Renamed, boxStart) { readBox(); }
/// <summary> Construct an ImageHeaderBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public ImageHeaderBox(RandomAccessIO in_Renamed, int boxStart):base(in_Renamed, boxStart) { readBox(); }
/// <summary> Construct a ChannelDefinitionBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public ChannelDefinitionBox(RandomAccessIO in_Renamed, int boxStart):base(in_Renamed, boxStart) { readBox(); }
/// <summary> Construct a PaletteBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public PaletteBox(RandomAccessIO in_Renamed, int boxStart) : base(in_Renamed, boxStart) { readBox(); }
/// <summary> Construct a ComponentMappingBox from an input image.</summary> /// <param name="in">RandomAccessIO jp2 image /// </param> /// <param name="boxStart">offset to the start of the box in the image /// </param> /// <exception cref="IOException,">ColorSpaceException /// </exception> public ComponentMappingBox(RandomAccessIO in_Renamed, int boxStart) : base(in_Renamed, boxStart) { readBox(); }