package org.autoplot; import org.das2.datum.Units; import org.das2.datum.UnitsUtil; import org.das2.graph.RGBImageRenderer; import org.das2.qds.DataSetOps; import org.das2.qds.QDataSet; import org.das2.qds.SemanticOps; import org.das2.qds.examples.Schemes; public enum RenderType { spectrogram, nnSpectrogram, hugeScatter, series, scatter, colorScatter, stairSteps, fillToZero, digital, image, pitchAngleDistribution, polar, // spectograms and line plots in polar coordinates eventsBar, stackedHistogram, // Voyager PWS uses these vectorPlot, bounds, // region colored by upper and lower bounds. internal, // user-defined or unrecognized Renderer orbitPlot, // call-outs with time vs position contour; /** * return true if the render type can make a reasonable rendering of the data. * If the render type is not recognized, just return true. This was introduced to * constrain the options of the user to valid entries. * * Note this is called on the event thread and must be implemented so that * evaluation takes a trivial amount of time. * * @param rt * @param ds * @return */ public static boolean acceptsData( RenderType rt, QDataSet ds ) { if ( null == rt ) return true; switch (rt) { case spectrogram: case nnSpectrogram: if ( SemanticOps.isTableDataSet(ds) ) { return true; } if ( Schemes.isXYZScatter(ds) ) return true; if ( Schemes.isLegacyXYZScatter(ds) ) return true; return false; case hugeScatter: switch (ds.rank()) { case 2: if ( SemanticOps.isBundle(ds) ) { for ( int i=0; i1 && ds.length(0)==2 ) ) || Schemes.isRank2Bins(ds); default: return true; } } }