if (pixData == null) rgb = ColorsFactory.getColor(w, -1); else  rgb = ColorsFactory.getColor(w, pixData.getLogicalChannel().getEmissionWave()); if (pixData != null && metadata.getAcquisitionContext().getPhotometricInterpretation().getValue() == "RGB") {  active = true; model = RenderingDefConstants.RGB; }
    public static RenderingDef createDefaultRenderingDef(Pixels metadata, PixelsStats stats)    {                int c_size = metadata.getSizeC().intValue();        int z_size = metadata.getSizeZ().intValue();                QuantumDef qDef = new QuantumDef();        qDef.setBitResolution(QuantumFactory.DEPTH_8BIT);        qDef.setCdStart(0);        qDef.setCdStop(QuantumFactory.DEPTH_8BIT);                ChannelBindings[] waves = new ChannelBindings[c_size];        PixTStatsEntry wGlobal;        int[] rgb = ColorsFactory.getColor(0,0); // FIXME was empty        Channel pixData;        boolean active = false;        int model = RenderingDefConstants.GS;        Map map = getPixelsChannelData(metadata);                for (int w = 0; w < c_size; ++w) {            pixData = (Channel) map.get(new Integer(w));            wGlobal = stats.getGlobalEntry(w);/* FIXME : very broken. ColorDomain and pixData.get_wave_lengths aren't there.*///            if (pixData == null) rgb = ColorsFactory.getColor(w, -1);//            else  rgb = ColorsFactory.getColor(w, 0);// FIXME FIXME pixData.getEm...);//            if (pixData != null && //                    pixData.getColorDomain() == RGB_COLOR_DOMAIN) {//                active = true;//                model = RenderingDefConstants.RGB;//            }             waves[w] = new ChannelBindings(w, wGlobal.globalMin,                                         wGlobal.globalMax, rgb, active,                                         QuantumFactory.LINEAR, 1);        }        waves[0].setActive(true);  //NOTE: dims object enforces 1 < sizeC.        RenderingDef newRD = new RenderingDef();        int defaultZ = z_size/2+z_size%2-1;        newRD.setDefaultZ(Integer.valueOf(defaultZ));        newRD.setDefaultT(Integer.valueOf(0));        newRD.setModel(RenderingDefConstants.convertToType(model));        newRD.setQuantization(qDef);        newRD.setWaveRendering(new HashSet(Arrays.asList(waves)));        return newRD;    }