本文整理了Java中jj2000.j2k.quantization.QuantTypeSpec
类的一些代码示例,展示了QuantTypeSpec
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QuantTypeSpec
类的具体详情如下:
包路径:jj2000.j2k.quantization.QuantTypeSpec
类名称:QuantTypeSpec
[英]This class extends ModuleSpec class in order to hold specifications about the quantization type to use in each tile-component. Supported quantization type are:
代码示例来源:origin: net.java.dev.jai-imageio/jai-imageio-jpeg2000
/** Sets <code>quantizationType</code> */
public void setQuantizationType(String values) {
quantizationType = new QuantTypeSpec(numTiles, numComponents,
ModuleSpec.SPEC_TYPE_TILE_COMP, this, values);
}
代码示例来源:origin: com.github.jai-imageio/jai-imageio-jpeg2000
setDefault("reversible");
else
setDefault("expounded");
return;
tileSpec = parseIdx(word,nTiles);
if(curSpecValType==SPEC_COMP_DEF){
curSpecValType = SPEC_TILE_COMP;
compSpec = parseIdx(word,nComp);
if(curSpecValType==SPEC_TILE_DEF){
curSpecValType = SPEC_TILE_COMP;
setDefault(word);
setTileDef(i,word);
for(int i=compSpec.length-1; i>=0; i--)
if(compSpec[i]){
setCompDef(i,word);
for(int j=compSpec.length-1; j>=0 ; j--){
if(tileSpec[i] && compSpec[j]){
setTileCompVal(i,j,word);
if(getDefault()==null){
int ndefspec = 0;
for(int t=nt-1; t>=0; t--){
代码示例来源:origin: com.github.jai-imageio/jai-imageio-jpeg2000
/**
* Check the irreversibility of the whole image.
*
* @return Whether or not the whole image is reversible
* */
public boolean isFullyNonReversible(){
// The whole image is irreversible no tile-component is reversible
for(int t=nTiles-1; t>=0; t--)
for(int c=nComp-1; c>=0; c--)
if( ((String)getSpec(t,c)).equals("reversible") )
return false;
return true;
}
代码示例来源:origin: org.openmicroscopy/ome-jai
switch(qts.getSpecValType(t,c)){
case SPEC_DEF:
if(getDefault()==null){
if( wp.getLossless() )
setDefault(parseFilters(REV_FILTER_STR));
if( ((String)qts.getDefault()).
equals("reversible") ){
setDefault(parseFilters(REV_FILTER_STR));
case SPEC_COMP_DEF:
if(!isCompSpecified(c)){
if( ((String)qts.getCompDef(c)).
equals("reversible") ){
setCompDef(c,parseFilters(REV_FILTER_STR));
case SPEC_TILE_DEF:
if(!isTileSpecified(t)){
if( ((String)qts.getTileDef(t)).
equals("reversible") ){
setTileDef(t,parseFilters(REV_FILTER_STR));
case SPEC_TILE_COMP:
if(!isTileCompSpecified(t,c)){
if(((String)qts.getTileCompVal(t,c)).
equals("reversible")){
setTileCompVal(t,c,parseFilters(REV_FILTER_STR));
if( ((String)qts.getDefault()).equals("reversible") )
setDefault(parseFilters(REV_FILTER_STR));
代码示例来源:origin: edu.ucar/jj2000
if(encSpec.qts.isTileSpecified(tileIdx) ||
encSpec.qsss.isTileSpecified(tileIdx) ||
encSpec.dls.isTileSpecified(tileIdx) ||
encSpec.qts.isTileCompSpecified(tileIdx,c) ||
encSpec.qsss.isTileCompSpecified(tileIdx,c) ||
encSpec.dls.isTileCompSpecified(tileIdx,c) ||
writeTileQCC(tileIdx,c);
} else if(tileQCDwritten) {
if(encSpec.qts.isCompSpecified(c) ||
encSpec.qsss.isCompSpecified(c) ||
encSpec.dls.isCompSpecified(c) ||
代码示例来源:origin: edu.ucar/jj2000
String qType = (String)encSpec.qts.getDefault();
float baseStep = ((Float)encSpec.qsss.getDefault()).floatValue();
int gb = ((Integer)encSpec.gbs.getDefault()).intValue();
for(int c=0; c<nc && notFound; c++) {
tmpI = ((Integer)encSpec.dls.getTileCompVal(t,c)).intValue();
tmpStr = (String)encSpec.qts.getTileCompVal(t,c);
if(tmpI==mrl && tmpStr.equals(qType)) {
tcIdx[0] = t; tcIdx[1] = c;
代码示例来源:origin: edu.ucar/jj2000
String qType = (String)encSpec.qts.getCompDef(compIdx);
float baseStep =
((Float)encSpec.qsss.getCompDef(compIdx)).floatValue();
for(int c=0; c<nc && notFound; c++) {
tmpI = ((Integer)encSpec.dls.getTileCompVal(t,c)).intValue();
tmpStr = (String)encSpec.qts.getTileCompVal(t,c);
if(tmpI==mrl && tmpStr.equals(qType)) {
tIdx = t;
代码示例来源:origin: edu.ucar/jj2000
float[] outfarr;
int w,h;
boolean reversible = qts.isReversible(tIdx,c);
boolean derived = qts.isDerived(tIdx,c);
StdDequantizerParams
params = (StdDequantizerParams)qsss.getTileCompVal(tIdx,c);
代码示例来源:origin: com.github.jai-imageio/jai-imageio-jpeg2000
/**
* Check the reversibility of the given tile-component.
*
* @param t The index of the tile
*
* @param c The index of the component
*
* @return Whether or not the tile-component is reversible
* */
public boolean isReversible(int t,int c){
if( ((String)getTileCompVal(t,c)).equals("reversible") )
return true;
else
return false;
}
代码示例来源:origin: net.java.dev.jai-imageio/jai-imageio-jpeg2000
/**
* Returns true if given tile-component uses derived quantization step
* sizes.
*
* @param t Tile index
*
* @param c Component index
*
* @return True if derived
*
*/
public boolean isDerived(int t,int c){
return qts.isDerived(t,c);
}
代码示例来源:origin: edu.ucar/jj2000
SubbandAn sb,csb,sbRoot;
String qType = (String)encSpec.qts.getTileDef(tIdx);
float baseStep = ((Float)encSpec.qsss.getTileDef(tIdx)).floatValue();
mrl = ((Integer)encSpec.dls.getTileDef(tIdx)).intValue();
for(int c=0; c<nc && notFound; c++) {
tmpI = ((Integer)encSpec.dls.getTileCompVal(tIdx,c)).intValue();
tmpStr = (String)encSpec.qts.getTileCompVal(tIdx,c);
if(tmpI==mrl && tmpStr.equals(qType)) {
compIdx = c;
代码示例来源:origin: edu.ucar/jj2000
/**
* Check the reversibility of the whole image.
*
* @return Whether or not the whole image is reversible
* */
public boolean isFullyReversible() {
// The whole image is reversible if default specification is
// rev and no tile default, component default and
// tile-component value has been specificied
if( ((String)getDefault()).equals("reversible") ) {
for(int t=nTiles-1; t>=0; t--)
for(int c=nComp-1; c>=0; c--)
if(specValType[t][c]!=SPEC_DEF)
return false;
return true;
}
return false;
}
代码示例来源:origin: edu.ucar/jj2000
/**
* Returns a copy of the current object.
* */
public DecoderSpecs getCopy() {
DecoderSpecs decSpec2;
try {
decSpec2 = (DecoderSpecs)this.clone();
} catch (CloneNotSupportedException e) {
throw new Error("Cannot clone the DecoderSpecs instance");
}
// Quantization
decSpec2.qts = (QuantTypeSpec)qts.getCopy();
decSpec2.qsss = (QuantStepSizeSpec)qsss.getCopy();
decSpec2.gbs = (GuardBitsSpec)gbs.getCopy();
// Wavelet transform
decSpec2.wfs = (SynWTFilterSpec)wfs.getCopy();
decSpec2.dls = (IntegerSpec)dls.getCopy();
// Component transformation
decSpec2.cts = (CompTransfSpec)cts.getCopy();
// ROI
if(rois!=null) {
decSpec2.rois = (MaxShiftSpec)rois.getCopy();
}
return decSpec2;
}
代码示例来源:origin: edu.ucar/jj2000
encSpec.qts.isCompSpecified(i) ||
encSpec.qsss.isCompSpecified(i) ||
encSpec.dls.isCompSpecified(i) ||
代码示例来源:origin: com.github.jai-imageio/jai-imageio-jpeg2000
SubbandAn sb,csb,sbRoot;
String qType = (String)wp.getQuantizationType().getTileDef(tIdx);
float baseStep = ((Float)wp.getQuantizationStep().getTileDef(tIdx)).floatValue();
mrl = ((Integer)wp.getDecompositionLevel().getTileDef(tIdx)).intValue();
代码示例来源:origin: net.java.dev.jai-imageio/jai-imageio-jpeg2000
switch(qts.getSpecValType(t,c)){
case SPEC_DEF:
if(getDefault()==null){
if( wp.getLossless() )
setDefault(parseFilters(REV_FILTER_STR));
if( ((String)qts.getDefault()).
equals("reversible") ){
setDefault(parseFilters(REV_FILTER_STR));
case SPEC_COMP_DEF:
if(!isCompSpecified(c)){
if( ((String)qts.getCompDef(c)).
equals("reversible") ){
setCompDef(c,parseFilters(REV_FILTER_STR));
case SPEC_TILE_DEF:
if(!isTileSpecified(t)){
if( ((String)qts.getTileDef(t)).
equals("reversible") ){
setTileDef(t,parseFilters(REV_FILTER_STR));
case SPEC_TILE_COMP:
if(!isTileCompSpecified(t,c)){
if(((String)qts.getTileCompVal(t,c)).
equals("reversible")){
setTileCompVal(t,c,parseFilters(REV_FILTER_STR));
if( ((String)qts.getDefault()).equals("reversible") )
setDefault(parseFilters(REV_FILTER_STR));
代码示例来源:origin: net.java.dev.jai-imageio/jai-imageio-jpeg2000
if(wp.getQuantizationType().isTileSpecified(tileIdx) ||
wp.getQuantizationStep().isTileSpecified(tileIdx) ||
wp.getDecompositionLevel().isTileSpecified(tileIdx) ||
wp.getQuantizationType().isTileCompSpecified(tileIdx,c) ||
wp.getQuantizationStep().isTileCompSpecified(tileIdx,c) ||
wp.getDecompositionLevel().isTileCompSpecified(tileIdx,c) ||
if(wp.getQuantizationType().isCompSpecified(c) ||
wp.getQuantizationStep().isCompSpecified(c) ||
wp.getDecompositionLevel().isCompSpecified(c) ||
代码示例来源:origin: net.java.dev.jai-imageio/jai-imageio-jpeg2000
float step;
String qType = (String)wp.getQuantizationType().getDefault();
float baseStep = ((Float)wp.getQuantizationStep().getDefault()).floatValue();
int gb = ((Integer)wp.getGuardBits().getDefault()).intValue();
for(int c=0; c<nc && notFound; c++) {
tmpI = ((Integer)wp.getDecompositionLevel().getTileCompVal(t,c)).intValue();
tmpStr = (String)wp.getQuantizationType().getTileCompVal(t,c);
if(tmpI==mrl && tmpStr.equals(qType)) {
tcIdx[0] = t; tcIdx[1] = c;
代码示例来源:origin: net.java.dev.jai-imageio/jai-imageio-jpeg2000
String qType = (String)wp.getQuantizationType().getCompDef(compIdx);
float baseStep = ((Float)wp.getQuantizationStep().getCompDef(compIdx)).floatValue();
int gb = ((Integer)wp.getGuardBits().getCompDef(compIdx)).intValue();
for(int c=0; c<nc && notFound; c++) {
tmpI = ((Integer)wp.getDecompositionLevel().getTileCompVal(t,c)).intValue();
tmpStr = (String)wp.getQuantizationType().getTileCompVal(t,c);
if(tmpI==mrl && tmpStr.equals(qType)) {
tIdx = t;
代码示例来源:origin: com.github.jai-imageio/jai-imageio-jpeg2000
float[] outfarr;
int w,h;
boolean reversible = qts.isReversible(tIdx,c);
boolean derived = qts.isDerived(tIdx,c);
StdDequantizerParams
params = (StdDequantizerParams)qsss.getTileCompVal(tIdx,c);
内容来源于网络,如有侵权,请联系作者删除!