private void updateColorBar(final int c) { final DatasetView view = imageDisplayService.getActiveDatasetView(display); if (view == null) return; // no active dataset List<ColorTable> colorTables = view.getColorTables(); if (c >= colorTables.size()) return; final ColorTable lut = colorTables.get(c); colorBar.setColorTable(lut); colorBar.repaint(); }
/** Sets the single LUT of an ImagePlus to the first ColorTable of a Dataset */ private void setImagePlusLUTToFirstInView(final DatasetView view, final ImagePlus imp) { ColorTable cTable = view.getColorTables().get(0); if (cTable == null) cTable = ColorTables.GRAYS; final LUT lut = make8BitLUT(cTable); imp.getProcessor().setColorModel(lut); // or imp.getStack().setColorModel(lut); }
final List<ColorTable> existingColorTables = dsView.getColorTables(); for (int i = 0; i < existingColorTables.size(); i++) dsView.setColorTable(newTable, i);
final DatasetView inView = imgDispService.getActiveDatasetView(input); final DatasetView outView = imgDispService.getActiveDatasetView(output); final List<ColorTable> inputColorTables = inView.getColorTables(); final int inputChanAxis = input.dimensionIndex(Axes.CHANNEL); final List<List<Long>> inputRanges = def.getInputRanges();
final CompositeImage ci = (CompositeImage) imp; final List<ColorTable> colorTables = (activeView == null) ? null : activeView.getColorTables(); setCompositeImageLUTs(ci, colorTables); final int composChannCount =