/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{tileSize as o}from"../../../definitions.js";import{Technique as e}from"../Technique.js";import{AspectTechnique as r}from"./processor/AspectTechnique.js";import{BandArithmeticTechnique as s}from"./processor/BandArithmeticTechnique.js";import{ColormapToRGBTechnique as t}from"./processor/ColormapToRGBTechnique.js";import{CompositeBandTechnique as i}from"./processor/CompositeBandTechnique.js";import{ComputeChangeTechnique as c}from"./processor/ComputeChangeTechnique.js";import{ContrastBrightnessTechnique as p}from"./processor/ContrastBrightnessTechnique.js";import{ConvolutionTechnique as n}from"./processor/ConvolutionTechnique.js";import{CurvatureTechnique as m}from"./processor/CurvatureTechnique.js";import{ExtractBandTechnique as h}from"./processor/ExtractBandTechnique.js";import{FocalStatisticsTechnique as u}from"./processor/FocalStatisticsTechnique.js";import{GrayscaleTechnique as a}from"./processor/GrayscaleTechnique.js";import{HillshadeTechnique as f}from"./processor/HillshadeTechnique.js";import{LocalTechnique as q}from"./processor/LocalTechnique.js";import{MaskTechnique as j}from"./processor/MaskTechnique.js";import{NDVITechnique as l}from"./processor/NDVITechnique.js";import{RemapTechnique as T}from"./processor/RemapTechnique.js";import{ReprojectTechnique as d}from"./processor/ReprojectTechnique.js";import{ShadedReliefTechnique as C}from"./processor/ShadedReliefTechnique.js";import{SlopeTechnique as B}from"./processor/SlopeTechnique.js";import{SpectralConversionTechnique as S}from"./processor/SpectralConversionTechnique.js";import{StretchTechnique as _}from"./processor/StretchTechnique.js";import{createNewFBO as v}from"./processor/textureUtils.js";const R=new Map([["Aspect",r],["BandArithmetic",s],["ColormapToRGB",t],["CompositeBand",i],["ComputeChange",c],["ContrastBrightness",p],["Convolution",n],["Curvature",m],["ExtractBand",h],["Grayscale",a],["Hillshade",f],["Local",q],["Mask",j],["NDVI",l],["Remap",T],["Reproject",d],["ShadedRelief",C],["Slope",B],["SpectralConversion",S],["Statistics",u],["Stretch",_]]);class g extends e{constructor(){super(...arguments),this.type=1,this.shaders={},this._techniques=new Map}shutdown(o){super.shutdown(o),this._fbo?.dispose(),this._fbo=void 0;for(const e of this._techniques.values())e.shutdown();this._techniques.clear()}render(e,r){this._fbo??=v(e.context,o,o);let{name:s}=e.rasterFunction;if("Arithmetic"===s&&(s="Local"),!this._techniques.has(s)){const o=R.get(s);if(!o)return;this._techniques.set(s,new o)}this._techniques.get(s).render(e,{...r,processorFbo:this._fbo})}}export{g as RasterProcessorTechnique};
