float getVertexColorValue(Mesh mesh, int vertexIndex) {
		float value, datum;
		/*
		 * but RETURNS the actual value, not the truncated one right, so what we are doing here is setting a range
		 * within the data for which we want red-->blue, but returning the actual number so it can be encoded more
		 * precisely. This turned out to be the key to making the JVXL contours work.
		 * 
		 */
		if (isBicolorMap && !isContoured) // will be current mesh only
			datum = value = mesh.vertexValues[vertexIndex];
		else if (colorByPhase)
			datum = value = getPhase(mesh.vertices[vertexIndex]);
		else if (jvxlDataIs2dContour)
			datum = value = getInterpolatedPixelValue(mesh.vertices[vertexIndex]);
		else datum = value = lookupInterpolatedVoxelValue(mesh.vertices[vertexIndex]);
		if (isBicolorMap && !isContoured || colorBySign) {
			if (value <= 0)
				mesh.vertexColixes[vertexIndex] = Graphics3D.getColix(isColorReversed ? colorPos : colorNeg);
			if (value > 0)
				mesh.vertexColixes[vertexIndex] = Graphics3D.getColix(isColorReversed ? colorNeg : colorPos);
			if (!isContoured)
				datum = (value > 0 ? 0.999f : -0.999f);
		}
		else {
			if (value < valueMappedToRed)
				value = valueMappedToRed;
			if (value >= valueMappedToBlue)
				value = valueMappedToBlue;
			mesh.vertexColixes[vertexIndex] = viewer.getColixFromPalette(isColorReversed ? valueMappedToBlue
					+ valueMappedToRed - value : value, valueMappedToRed, valueMappedToBlue, colorScheme);
		}
		return datum;
	}