Exemple #1
0
        public TilePartComponent(TilePart tilePart, TileComponent tileComponent)
        {
            TilePart = tilePart;

            TileComponent = tileComponent;

            COC = tilePart.Header.COC[TileComponent.Component.ComponentIndex];
            QCC = tilePart.Header.QCC[TileComponent.Component.ComponentIndex];

            var nResolutions = COC.SP_NumberOfDecompositionLevels + 1;

            ResolutionLevels = new ResolutionLevel[nResolutions];

            for (var iResolution = 0; iResolution < nResolutions; iResolution++)
            {
                ResolutionLevels[iResolution] = new ResolutionLevel(this, iResolution);
            }

            if (COC.SP_WaveletTransformUsed == WaveletTransform.Reversible_5_3)
            {
                ArithmeticType = ArithmeticType.Int32;
            }
            else if (COC.SP_WaveletTransformUsed == WaveletTransform.Irreversible_9_7)
            {
                ArithmeticType = ArithmeticType.Double;
            }
            else
            {
                throw NotSupported(COC.SP_WaveletTransformUsed);
            }
        }
Exemple #2
0
        public Tile(Image image, int tileIndex)
        {
            Image = image;

            TileIndex = tileIndex;

            HorizontalIndex = TileIndex % Image.NTilesY;

            VerticalIndex = TileIndex / Image.NTilesY;

            BoundsInReferenceGrid_tx = image.GetTileBoundsInReferenceGrid_tx(HorizontalIndex, VerticalIndex);

            TileComponents = new TileComponent[Image.Components.Length];

            for (var iComponent = 0; iComponent < image.Components.Length; iComponent++)
            {
                TileComponents[iComponent] = new TileComponent(this, image.Components[iComponent]);
            }
        }