/// <summary>
        /// Prepares the result of the operation.
        /// </summary>
        /// <returns>The resulting object.</returns>
        protected override ISpectralGeometry PrepareResult()
        {
            RasterPresentation presentation = null;

            if (_bandIndices.SequenceEqual(Enumerable.Range(0, Source.Raster.NumberOfBands)))
            {
                presentation = Source.Presentation;
            }
            else if (_bandIndices.Length == 3)
            {
                presentation = RasterPresentation.CreateFalseColorPresentation(0, 1, 2);
            }
            else
            {
                presentation = RasterPresentation.CreateGrayscalePresentation();
            }

            RasterImaging imaging = null;

            if (Source.Imaging != null)
            {
                imaging = RasterImaging.Filter(Source.Imaging, _bandIndices);
            }

            SetResultProperties(Source.Raster.Format, _bandIndices.Length, Source.Raster.NumberOfRows, Source.Raster.NumberOfColumns, Source.Raster.RadiometricResolution, Source.Raster.Mapper, presentation, imaging);

            return(base.PrepareResult());
        }
Beispiel #2
0
        /// <summary>
        /// Prepares the result of the operation.
        /// </summary>
        /// <returns>The resulting object.</returns>
        protected override ISpectralGeometry PrepareResult()
        {
            SetResultProperties(RasterFormat.Floating, 3, 32, RasterPresentation.CreateFalseColorPresentation(0, 1, 2));

            return(base.PrepareResult());
        }