This class is the main class of JJ2000's encoder. It instantiates all objects of the chain and launchs the encoding process. It then writes the header and the compressed bit stream to the output file. Finally, packed packet headers (through codestream post-manipulation) and file-format may be created if needed.
First the encoder should be initialized with a ParameterList object provided through the constructor. Then, the run() method is invoked and the encoder executes. The exit code of the class can be obtained with the getExitCode() method, after the constructor and after the run method. A non-zero value indicates that an error has occurred.
The modules are inserted in the encoding chain with the following order:
- ImgReader
- ImgDataJoiner (if multiple image readers)
- Tiler
- ForwCompTransf
- ImgDataConverter
- ForwardWT
- Quantizer
- ROIScaler
- EntropyCoder
- PostCompRateAllocator
The encoder uses a pull model. This means that the last module (PostCompRateAllocator) requests data from its source (EntropyCoder), ...
Writing of the codestream writing (header+bit stream) is realized by HeaderEncoder and CodestreamWriter modules.
Packed packet headers and file-format creation are carried out by CodestreamManipulator and FileFormatWriter modules respectively.
Many modules of the encoder may behave differently depending on the tile-component. The specifications of their behaviour are kept in specialized modules extending ModuleSpec class. All these modules are accessible through an instance of EncoderSpecs class.
@see ImgReader
@see ImgDataJoiner
@see ForwCompTransf
@see Tiler
@see ImgDataConverter
@see ForwardWT
@see Quantizer
@see ROIScaler
@see EntropyCoder
@see PostCompRateAllocator
@see HeaderEncoder
@see CodestreamWriter
@see CodestreamManipulator
@see FileFormatWriter
@see ModuleSpec
@see EncoderSpecs