/// <summary>
        /// Prepares the result of the operation.
        /// </summary>
        protected override ISpectralGeometry PrepareResult()
        {
            IRasterFactory factory = Source.Factory.GetFactory <ISpectralGeometryFactory>()
                                     .GetFactory <IRasterFactory>();

            Int32 radiometricResolution = _numberOfCategories > 65535 ? 32 : (_numberOfCategories > 255 ? 16 : 8);

            IRaster raster = factory.CreateRaster(_categoryIndices.Count, Source.Raster.NumberOfRows,
                                                  Source.Raster.NumberOfColumns, radiometricResolution,
                                                  Source.Raster.Mapper);

            return(Source.Factory.CreateSpectralGeometry(Source, raster, Source.Presentation, Source.Imaging));
        }