Package jj2000.j2k.codestream

Examples of jj2000.j2k.codestream.HeaderInfo$SOT


        this.sptServiceFactory = sptServiceFactory;
    }

  @Override
  public void setSPTVisitor(SPTVisitor vis) {
    throw new NotImplementedError();
  }
View Full Code Here


        return newPath;
    }

  @Override
  public void setSPTVisitor(SPTVisitor vis) {
    throw new NotImplementedError();
  }
View Full Code Here

        return spt.getPaths();
    }

  @Override
  public void setSPTVisitor(SPTVisitor vis) {
    throw new NotImplementedError();
  }
View Full Code Here

     *
     * @param configuration
     * @throws Exception
     */
    public boolean startEmbeddedBroker(Properties configuration) throws Exception {
        throw new NotImplementedError("This functionality is not implemented");
    }
View Full Code Here

     * Stops the embedded broker
     *
     * @throws Exception
     */
    public boolean stopEmbeddedBroker() throws Exception {
        throw new NotImplementedError("This functionality is not implemented");
    }
View Full Code Here

                        }

                        @Override
                        public Object unmarshal(HierarchicalStreamReader reader,
                                UnmarshallingContext context) {
                            throw new NotImplementedError("Not implemented");
                        }

                    });
            }

            @Override
            public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
                throw new NotImplementedError("Not implemented");
            }

        });
        xs.alias("resource", ManifestModel.class);
        xs.addImplicitCollection(ManifestModel.class, "entries");
View Full Code Here

        // Rely on rate allocator to limit amount of data
        File tmpFile = File.createTempFile("jiio-", ".tmp");
        tmpFile.deleteOnExit();

        // Creates CodestreamWriter
        FileCodestreamWriter bwriter =
            new FileCodestreamWriter(tmpFile, Integer.MAX_VALUE);

        // Creates the rate allocator
        float rate = (float)j2kwparam.getEncodingRate();
        PostCompRateAllocator ralloc =
            PostCompRateAllocator.createInstance(ecoder,
                                                 rate,
                                                 bwriter,
                                                 j2kwparam);

        // Instantiates the HeaderEncoder
        HeaderEncoder headenc =
            new HeaderEncoder(imgsrc, imsigned, dwt, imgtiler,
                              j2kwparam, rois,ralloc);

        ralloc.setHeaderEncoder(headenc);

        // Writes header to be able to estimate header overhead
        headenc.encodeMainHeader();

        //Initializes rate allocator, with proper header
        // overhead. This will also encode all the data
        try {
            ralloc.initialize();
        } catch (RuntimeException e) {
            if (WRITE_ABORTED.equals(e.getMessage())) {
                bwriter.close();
                tmpFile.delete();
                processWriteAborted();
                return;
            } else throw e;
        }

        // Write header (final)
        headenc.reset();
        headenc.encodeMainHeader();

        // Insert header into the codestream
        bwriter.commitBitstreamHeader(headenc);

        // Now do the rate-allocation and write result
        ralloc.runAndWrite();

        //Done for data encoding
        bwriter.close();

        // Calculate file length
        int fileLength = bwriter.getLength();

        // Tile-parts and packed packet headers
        int pktspertp = j2kwparam.getPacketPerTilePart();
        int ntiles = imgtiler.getNumTiles();
        if (pktspertp>0 || pphTile || pphMain){
View Full Code Here

                                                 rate,
                                                 bwriter,
                                                 j2kwparam);

        // Instantiates the HeaderEncoder
        HeaderEncoder headenc =
            new HeaderEncoder(imgsrc, imsigned, dwt, imgtiler,
                              j2kwparam, rois,ralloc);

        ralloc.setHeaderEncoder(headenc);

        // Writes header to be able to estimate header overhead
        headenc.encodeMainHeader();

        //Initializes rate allocator, with proper header
        // overhead. This will also encode all the data
        try {
            ralloc.initialize();
        } catch (RuntimeException e) {
            if (WRITE_ABORTED.equals(e.getMessage())) {
                bwriter.close();
                tmpFile.delete();
                processWriteAborted();
                return;
            } else throw e;
        }

        // Write header (final)
        headenc.reset();
        headenc.encodeMainHeader();

        // Insert header into the codestream
        bwriter.commitBitstreamHeader(headenc);

        // Now do the rate-allocation and write result
View Full Code Here

    pl.setProperty("i", inputFileName );
    param = pl.getParameter("i");
   
   
        showStatus("Initializing JJ2000 decoder...");
        dec = new Decoder(pl);
        showStatus("Decoding...");
        dec.run();
        outputFilesPaths = dec.getOutputFilesPaths();
        numComponents = dec.getNumComponents();
  }
View Full Code Here

        {
          sb.append("-" + e.getKey() + " " + e.getValue() + " ");
        }
       
       
        dec = new Encoder(pl);
        showStatus("Encoding... parameters " + sb.toString());
        dec.run();
  }
View Full Code Here

TOP

Related Classes of jj2000.j2k.codestream.HeaderInfo$SOT

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.