|  | @@ -37,10 +37,10 @@ SO2:SO2
 | 
	
		
			
				|  |  |  CO2:CO2
 | 
	
		
			
				|  |  |  Height:水位高度
 | 
	
		
			
				|  |  |  */
 | 
	
		
			
				|  |  | -const scalarName = ref("CO2");
 | 
	
		
			
				|  |  | -const filedir =ref("data/Fire/");
 | 
	
		
			
				|  |  | -// const scalarName = ref("Height");
 | 
	
		
			
				|  |  | -// const filedir =ref("data/Water/");
 | 
	
		
			
				|  |  | +// const scalarName = ref("CO2");
 | 
	
		
			
				|  |  | +// const filedir =ref("data/Fire/");
 | 
	
		
			
				|  |  | +const scalarName = ref("Height");
 | 
	
		
			
				|  |  | +const filedir =ref("data/Water/");
 | 
	
		
			
				|  |  |  const renderWindowWith = vtkRenderWindowWithControlBar.newInstance({
 | 
	
		
			
				|  |  |      controlSize: 11,
 | 
	
		
			
				|  |  |    });
 | 
	
	
		
			
				|  | @@ -89,17 +89,9 @@ function increment() {
 | 
	
		
			
				|  |  |      size:polydata.getNumberOfPoints()
 | 
	
		
			
				|  |  |    }); 
 | 
	
		
			
				|  |  |    dataArray.setData(scalarArray);
 | 
	
		
			
				|  |  | -  // console.log("dataArray1:",JSON.stringify(dataArray)==JSON.stringify(polydata.getPointData().getScalars()));
 | 
	
		
			
				|  |  | -  // polydata.getPointData().removeAllArrays();
 | 
	
		
			
				|  |  |    polydata.getPointData().setScalars(dataArray); 
 | 
	
		
			
				|  |  | -  // getMinMax(scalarArray);
 | 
	
		
			
				|  |  | -  // mapper.setScalarRange(min.value,max.value);//设置范围
 | 
	
		
			
				|  |  | -  // console.log("dataArray2:",JSON.stringify(dataArray)==JSON.stringify(polydata.getPointData().getScalars()));
 | 
	
		
			
				|  |  | -  // mapper.setInputData(polydata);
 | 
	
		
			
				|  |  | + 
 | 
	
		
			
				|  |  |    mapper.clearColorArrays();//强制重建颜色
 | 
	
		
			
				|  |  | -  // actor.setMapper(mapper);
 | 
	
		
			
				|  |  | -  // mapper.setInputData(polydata);
 | 
	
		
			
				|  |  | -  // renderer.addActor(actor);
 | 
	
		
			
				|  |  |    actor.getProperty().setOpacity(count.value);//设置错误的透明度使得页面重新加载  不设置不刷新页面
 | 
	
		
			
				|  |  |    renderWindow.render();
 | 
	
		
			
				|  |  |  }
 | 
	
	
		
			
				|  | @@ -184,8 +176,10 @@ onMounted(() => {
 | 
	
		
			
				|  |  |      //修改设条颜色
 | 
	
		
			
				|  |  |      const ctf = vtkColorTransferFunction.newInstance();
 | 
	
		
			
				|  |  |      ctf.addRGBPoint(0.0, 0.0, 0.0, 1.0);
 | 
	
		
			
				|  |  | -    ctf.addRGBPoint(1.0, 0.0, 1.0, 0.0);
 | 
	
		
			
				|  |  | -    ctf.addRGBPoint(2.0, 1.0, 0.0, 0.0);
 | 
	
		
			
				|  |  | +    ctf.addRGBPoint(1.0, 0.0, 1.0, 0.5);
 | 
	
		
			
				|  |  | +    ctf.addRGBPoint(2.0, 0.0, 1.0, 0.0);
 | 
	
		
			
				|  |  | +    ctf.addRGBPoint(3.0, 1.0, 0.5, 0.0);
 | 
	
		
			
				|  |  | +    ctf.addRGBPoint(4.0, 1.0, 0.0, 0.0);
 | 
	
		
			
				|  |  |      mapper.setLookupTable(ctf);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 |