{
if(sm.getNumBands()==3)
return new DimensionlessAxis(
Arrays.asList("CYAN","MAGENTA","YELLOW"),
new NameImpl("CMY-AXIS"),
new SimpleInternationalString("Axis for CMY bands"));
else
return new DimensionlessAxis(
Arrays.asList("CYAN","MAGENTA","YELLOW","BLACK"),
new NameImpl("CMYK-AXIS"),
new SimpleInternationalString("Axis for CMYK bands"));
}
// HSV
if(firstBandCI==ColorInterpretation.HUE_BAND)
{
return new DimensionlessAxis(
Arrays.asList("HUE","SATURATION","VALUE"),
new NameImpl("HSV-AXIS"),
new SimpleInternationalString("Axis for HSV bands"));
}
//RGBA
if(firstBandCI==ColorInterpretation.RED_BAND)
{
return new DimensionlessAxis(
Arrays.asList("RED","GREEN","BLUE","ALPHA"),
new NameImpl("RGBA-AXIS"),
new SimpleInternationalString("Axis for RGBA bands"));
}
//PALETTE
if(firstBandCI==ColorInterpretation.PALETTE_INDEX)
return new DimensionlessAxis(
Arrays.asList("PALETTE_INDEX"),
new NameImpl("PALETTE_INDEX-AXIS"),
new SimpleInternationalString("Axis for PALETTE INDEX bands"));
// GRAY, GRAY+ALPHA
if(firstBandCI==ColorInterpretation.GRAY_INDEX)
{
if(sm.getNumBands()==2)
return new DimensionlessAxis(
Arrays.asList("GRAY","ALPHA"),
new NameImpl("GA-AXIS"),
new SimpleInternationalString("Axis for GRAY-ALPHA bands"));
else
return new DimensionlessAxis(
Arrays.asList("GRAY"),
new NameImpl("GRAY-AXIS"),
new SimpleInternationalString("Axis for GRAY bands"));
}
final ColorSpace cs = cm.getColorSpace();
//IHS
if(cs instanceof IHSColorSpace)
return new DimensionlessAxis(
Arrays.asList("INTENSITY","HUE","SATURATION"),
new NameImpl("IHS-AXIS"),
new SimpleInternationalString("Axis for IHS bands"));
//YCbCr, LUV, LAB, HLS, IEXYZ
switch(cs.getType()){
case ColorSpace.TYPE_YCbCr:
return new DimensionlessAxis(
Arrays.asList("LUMA","CHROMA-A","CHROMA-B"),
new NameImpl("YCbCr-AXIS"),
new SimpleInternationalString("Axis for YCbCr bands"));
case ColorSpace.TYPE_Luv:
return new DimensionlessAxis(
Arrays.asList("LIGHTNESS","U","V"),
new NameImpl("LUV-AXIS"),
new SimpleInternationalString("Axis for LUV bands"));
case ColorSpace.TYPE_Lab:
return new DimensionlessAxis(
Arrays.asList("LIGHTNESS","A","B"),
new NameImpl("LAB-AXIS"),
new SimpleInternationalString("Axis for LAB bands"));
case ColorSpace.TYPE_HLS:
return new DimensionlessAxis(
Arrays.asList("HUE","LIGHTNESS","SATURATION"),
new NameImpl("HLS-AXIS"),
new SimpleInternationalString("Axis for HLS bands"));
case ColorSpace.CS_CIEXYZ:
return new DimensionlessAxis(
Arrays.asList("X","Y","Z"),
new NameImpl("XYZ-AXIS"),
new SimpleInternationalString("Axis for XYZ bands"));
default:
return null;