G'day,
Thanks very much Don. The code you provided does work to create boxes
whose heights are logarithmically scaled.
However, in the application I'm working on I'm providing a toggle that
allows the user to dynamically switch between linear and logarithmic
scaling of the z-axis (intensity & height). Here's the code that is
called when the switch is made:
public void setUseLog10Intensity(final boolean useLog10) throws
VisADException, RemoteException {
useLog10Intensity = useLog10;
// Update maps.
if (useLog10Intensity) {
safeRemoveMap(intensityMap);
safeRemoveMap(heightMap);
addMap(logIntensityMap);
addMap(logHeightMap);
} else {
safeRemoveMap(logIntensityMap);
safeRemoveMap(logHeightMap);
addMap(intensityMap);
addMap(heightMap);
}
// Reset range.
setIntensityRange(0.0, maxIntensity);
}
So, would your suggestion below achieve this toggling ability?
... you need to have something that will map
your raw height values to the logrithmic vertical dimension. One way
would be to add a CoordinateSystem to the pointTupleType so you would
have the logHeightType in the domain (through the CS) and the mapping
would be picked up. You don't want to change retentionTimeType or
mzType, so you want to have IdentityCoordinateSystems for those values.
So, you could have IdentityCS's for retentionTimeType and mzType and
then have a CartesianProductCoordinateSystem of those and the
LogCoordinateSystem for the height and attach that to your
> pointTupleType.
I tried defining pointTupleType as follows:
new RealTupleType(
retentionTimeType,
mzType,
heightType,
new CartesianProductCoordinateSystem(
new CoordinateSystem[]{
new IdentityCoordinateSystem(
new RealTupleType(retentionTimeType)),
new IdentityCoordinateSystem(new RealTupleType(mzType)),
new LogCoordinateSystem(new RealTupleType(heightType)}),
null)
but this produces a warning:
Single DisplayRealType DisplayXAxis occurs more than once:
ShadowType.testIndices
and no highlight boxes.
I could maintain two sets of boxes (linear and logarithmic heights) and
show/hide them as the user switches scaling modes but I thought a more
"elegant" solution might be possible.
For reference, the two classes I've been working on are in the mzmine
svn repository:
ThreeDDisplay:
http://mzmine.svn.sourceforge.net/viewvc/mzmine/branches/syngenta_normalize_slider/src/net/sf/mzmine/modules/visualization/threed/ThreeDDisplay.java?revision=2566&view=markup
ThreeDPeakCells:
http://mzmine.svn.sourceforge.net/viewvc/mzmine/branches/syngenta_normalize_slider/src/net/sf/mzmine/modules/visualization/threed/ThreeDPeakCells.java?revision=2566&view=markup
Thanks again for your help.
Regards,
Chris.
This message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited.