CSJ2K.j2k.wavelet.WTDecompSpec.setMainCompDefDecompType C# (CSharp) Method

setMainCompDefDecompType() public method

Sets the "component main default" decomposition type and number of levels for the specified component. Both 'dec' and 'lev' can not be negative at the same time.
public setMainCompDefDecompType ( int n, int dec, int lev ) : void
n int The component index /// ///
dec int The decomposition type. If negative then the main default is /// used. /// ///
lev int The number of levels. If negative then the main defaul is /// used. /// /// /// ///
return void
        public virtual void setMainCompDefDecompType(int n, int dec, int lev)
        {
            if (dec < 0 && lev < 0)
            {
                throw new System.ArgumentException();
            }
            // Set spec type and decomp
            specValType[n] = DEC_SPEC_COMP_DEF;
            if (compMainDefDecompType == null)
            {
                compMainDefDecompType = new int[specValType.Length];
                compMainDefLevels = new int[specValType.Length];
            }
            compMainDefDecompType[n] = (dec >= 0)?dec:mainDefDecompType;
            compMainDefLevels[n] = (lev >= 0)?lev:mainDefLevels;
            // For the moment disable it since other parts of JJ2000 do not
            // support this
            throw new NotImplementedException("Currently, in JJ2000, all components " + "and tiles must have the same " + "decomposition type and number of " + "levels");
        }