@classmethod<EOL><INDENT>def parse(cls, fptr, offset, length):<DEDENT>
<EOL>read_buffer = fptr.read(<NUM_LIT>)<EOL>params = struct.unpack('<STR_LIT>', read_buffer)<EOL>height = params[<NUM_LIT:0>]<EOL>width = params[<NUM_LIT:1>]<EOL>num_components = params[<NUM_LIT:2>]<EOL>bits_per_component = (params[<NUM_LIT:3>] & <NUM_LIT>) + <NUM_LIT:1><EOL>signed = (params[<NUM_LIT:3>] & <NUM_LIT>) > <NUM_LIT:1><EOL>compression = params[<NUM_LIT:4>]<EOL>colorspace_unknown = True if params[<NUM_LIT:5>] else False<EOL>ip_provided = True if params[<NUM_LIT:6>] else False<EOL>return cls(height, width, num_components=num_components,<EOL>bits_per_component=bits_per_component,<EOL>signed=signed,<EOL>compression=compression,<EOL>colorspace_unknown=colorspace_unknown,<EOL>ip_provided=ip_provided,<EOL>length=length, offset=offset)<EOL>
Parse JPEG 2000 image header box.

        Parameters
        ----------
        fptr : file
            Open file object.
        offset : int
            Start position of box in bytes.
        length : int
            Length of the box in bytes.

        Returns
        -------
        ImageHeaderBox
            Instance of the current image header box.