Beispiel #1
0
        protected override void SaveAndReport(SaverParams saverParams, float normalization, float maxValue)
        {
            switch (saverParams.DestinationType)
            {
                case FileType.raw:
                    {
                        SaveAsRaw(saverParams.Path, saverParams.SavingArea);
                        break;
                    }
                case FileType.bmp:
                    {
                        DataProcessor.Abstract.DataStringProcessor processor = null;

                        if (_file.Header.BytesPerSample == 4)
                        {
                            processor = Processor;
                        }
                        else if (_file.Header.BytesPerSample == 8)
                        {
                            processor = new DataProcessor.Concrete.DataStringModulusProcessor();
                        }
                        else
                        {
                            throw new ArgumentException("Bytes per sample");
                        }

                        SaveAsBmp(saverParams.Path, saverParams.SavingArea, normalization, maxValue, processor, saverParams.OutputType, saverParams.Palette, saverParams.ImageFilter);
                        break;
                    }
                default:
                    throw new NotSupportedException("Unsupported destination type");
            }
        }
Beispiel #2
0
 protected override void SaveAndReport(SaverParams saverParams, float normalization, float maxValue)
 {
     switch (saverParams.DestinationType)
     {
         case FileType.brl4:
             {
                 SaveAsBrl4(saverParams.Path, saverParams.SavingArea);
                 break;
             }
         case FileType.raw:
             {
                 SaveAsRaw(saverParams.Path, saverParams.SavingArea);
                 break;
             }
         case FileType.rl4:
             {
                 SaveAsRl4(saverParams.Path, saverParams.SavingArea);
                 break;
             }
         case FileType.bmp:
             {
                 SaveAsBmp(saverParams.Path, saverParams.SavingArea, normalization, maxValue, Processor, saverParams.OutputType,
                 saverParams.Palette, saverParams.ImageFilter);
                 break;
             }
         default:
             throw new NotSupportedException("Unsupported destination type");
     }
 }
Beispiel #3
0
 protected override void SaveAndReport(SaverParams saverParams, float normalization, float maxValue)
 {
     switch (saverParams.DestinationType)
     {
         case FileType.raw:
             { 
             SaveAsRaw(saverParams.Path, saverParams.SavingArea);
             break;
             }
         case FileType.bmp:
             {
                 SaveAsBmp(saverParams.Path, saverParams.SavingArea, normalization, maxValue, Processor, saverParams.OutputType,
                     saverParams.Palette, saverParams.ImageFilter);
                 break;
             }
         case FileType.rl4:
             { 
             SaveAsRl4(saverParams.Path, saverParams.SavingArea, ".rl4", RlViewer.Headers.Concrete.Rl4.SampleType.Float, Processor);
             break;
             }
         case FileType.rl8:
             {
                 SaveAsRl4(saverParams.Path, saverParams.SavingArea, ".rl8", RlViewer.Headers.Concrete.Rl4.SampleType.Complex,
                 new DataProcessor.Concrete.DataStringSampleProcessor());
                 break;
             }
         case FileType.brl4:
             {
                 SaveAsBrl4(saverParams.Path, saverParams.SavingArea, ".brl4", new DataProcessor.Concrete.DataStringModulusProcessor());
                 break;
             }
         default:
             throw new NotSupportedException("Unsupported destination type");
     }
 }
Beispiel #4
0
 protected override void SaveAndReport(SaverParams saverParams, float normalization, float maxValue)
 {
     switch (saverParams.DestinationType)
     {
         case FileType.raw:
             SaveAsRaw(saverParams.Path, saverParams.SavingArea);
             break;
         case FileType.bmp:
             SaveAsBmp(saverParams.Path, saverParams.SavingArea, normalization, maxValue, new DataProcessor.Concrete.DataStringSampleProcessor(), saverParams.OutputType,
                 saverParams.Palette, saverParams.ImageFilter);
             break;
         default:
             throw new NotSupportedException("Unsupported destination type");
     }
 }
Beispiel #5
0
 public void Save(SaverParams saverParams, float normalization, float maxValue)
 {
     OnNameReport("Сохранение изображения");
     SaveAndReport(saverParams, normalization, maxValue);
 }
Beispiel #6
0
 protected abstract void SaveAndReport(SaverParams saverParams, float normalization, float maxValue);
Beispiel #7
0
 protected override void SaveAndReport(SaverParams saverParams, float normalization, float maxValue)
 {
     throw new NotImplementedException();
 }