Exemplo n.º 1
0
 public FinalImagesModel(TextureCacheModel cache, ImagesModel images)
 {
     this.images = new FinalImageModel[App.MaxImageViews];
     for (var i = 0; i < this.images.Length; i++)
     {
         this.images[i] = new FinalImageModel(cache, images);
     }
 }
Exemplo n.º 2
0
 public ImageEquationsModel(ImagesModel images)
 {
     equations = new ImageEquationModel[App.MaxImageViews];
     for (int i = 0; i < equations.Length; i++)
     {
         equations[i] = new ImageEquationModel(i == 0, i, images);
         equations[i].PropertyChanged += EquationOnPropertyChanged;
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// window after the opengl host was initialized
        /// </summary>
        /// <param name="app"></param>
        /// <param name="window"></param>
        public Models(App app, MainWindow window, WindowViewModel viewModel)
        {
            this.App  = new AppModel(app, window);
            GlContext = new OpenGlContext(window, viewModel);
            GlContext.Enable();

            Images      = new ImagesModel(GlContext, App);
            GlData      = new OpenGlModel(GlContext, Images);
            Display     = new DisplayModel(Images, GlContext);
            Equations   = new ImageEquationsModel(Images);
            Progress    = new ProgressModel();
            FinalImages = new FinalImagesModel(GlData.TextureCache, Images);
            Filter      = new FiltersModel();
            Statistics  = new StatisticsModel();
            Export      = new ExportModel(Images, Display);

            GlContext.Disable();
        }
Exemplo n.º 4
0
        public OpenGlModel(OpenGlContext context, ImagesModel images)
        {
            Debug.Assert(context.GlEnabled);
            Vao               = new VertexArray();
            CheckersShader    = new CheckersShader();
            samplerLinear     = new Sampler(TextureMinFilter.Linear, TextureMagFilter.Linear);
            samplerLinearMip  = new Sampler(TextureMinFilter.LinearMipmapLinear, TextureMagFilter.Linear);
            samplerNearest    = new Sampler(TextureMinFilter.Nearest, TextureMagFilter.Nearest);
            samplerNearestMip = new Sampler(TextureMinFilter.NearestMipmapNearest, TextureMagFilter.Nearest);
            TextureCache      = new TextureCacheModel(images, context);
            GetPixelShader    = new PixelValueShader();
            SrgbShader        = new SrgbShader();
            ExportShader      = new PixelExportShader();

            LinearMaxStatistics = new MaxStatistics(false);
            SrgbMaxStatistics   = new MaxStatistics(true);
            LinearMinStatistics = new MinStatistics(false);
            SrgbMinStatistics   = new MinStatistics(true);
            LinearAvgStatistics = new AverageStatistics(false, images);
            SrgbAvgStatistics   = new AverageStatistics(true, images);
        }
Exemplo n.º 5
0
 public FinalImageModel(TextureCacheModel textureCache, ImagesModel images)
 {
     this.textureCache            = textureCache;
     this.images                  = images;
     this.images.PropertyChanged += ImagesOnPropertyChanged;
 }