{ CodomainChain chain = renderer.getCodomainChain(); chain.setInterval(start, end); RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantumDef(), newQd; newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, start, end, qd.bitResolution); rd.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rd.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } }
{ CodomainChain chain = renderer.getCodomainChain(); chain.setInterval(start, end); RenderingDef rd = renderer.getRenderingDef(); QuantumDef qd = rd.getQuantumDef(), newQd; newQd = new QuantumDef(qd.pixelType, start, end, qd.bitResolution, qd.noiseReduction); rd.setQuantumDef(newQd); CodomainMapContext mapCtx; Iterator i = rd.getCodomainChainDef().iterator(); while (i.hasNext()) { mapCtx = (CodomainMapContext) i.next(); mapCtx.setCodomain(start, end); } }
	public void setCodomainInterval(int start, int end)	{		CodomainChain chain = renderer.getCodomainChain();		chain.setInterval(start, end);		RenderingDef rd = renderer.getRenderingDef();		QuantumDef qd = rd.getQuantumDef(), newQd;		newQd = new QuantumDef(qd.family, qd.pixelType, qd.curveCoefficient, 												start, end, qd.bitResolution);		rd.setQuantumDef(newQd);		CodomainMapContext mapCtx;		Iterator i = rd.getCodomainChainDef().iterator();		while (i.hasNext()) {			mapCtx = (CodomainMapContext) i.next();			mapCtx.setCodomain(start, end);		}	}