Package sc.fiji.snt.gui
Class PaletteOptions
java.lang.Object
sc.fiji.snt.gui.PaletteOptions
Per-palette delegate that builds the "More »" pop-up menu and supplies supporting operations (LUT, MIP overlay,
snapshot, etc.) shared by SNT's preview-wizard windows (
SigmaPalette, and CostPalette).- Author:
- Tiago Ferreira
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPaletteOptions(ij.ImagePlus paletteImage, ij.ImagePlus sourceImage, String snapshotTitle, Runnable onDismiss) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHelpEntry(PopupMenu pm, String htmlMessage, Component dialogParent) voidAdds the standard LUT submenu (Default + 7 SNT favourites) to the supplied popup menu.voidApplies a named ImageJ LUT to the palette image.buildMoreButton(Component parent, String helpHtml, Consumer<PopupMenu> extras) Builds the standard "More »" button populated with help, LUT submenu, MIP toggle, optional wizard-specific items, snapshot, and dismiss.voidRefreshes the MIP overlay (if currently shown) so it picks up LUT/min/max changes.
-
Constructor Details
-
PaletteOptions
public PaletteOptions(ij.ImagePlus paletteImage, ij.ImagePlus sourceImage, String snapshotTitle, Runnable onDismiss) - Parameters:
paletteImage- the wizard's preview image (the one whose LUT, MIP, snapshot, etc. the menu operates on)sourceImage- the original image whose LUT is restored by the "Default" LUT entry; may benullsnapshotTitle- title given to the duplicated image produced by the "Take Snapshot" entryonDismiss- called when the user picks the "Dismiss" item
-
-
Method Details
-
buildMoreButton
Builds the standard "More »" button populated with help, LUT submenu, MIP toggle, optional wizard-specific items, snapshot, and dismiss.- Parameters:
parent- the AWT container thePopupMenuattaches to (typically the wizard window). PopupMenu instances must be added to a Component beforeshow()can display them.helpHtml- HTML message displayed by the "Help" entry; passnullto omit the entryextras- callback that appends wizard-specific menu items between the MIP toggle and the snapshot entry; passnullfor none. The callback receives the rin-progress popup menu and may add items / separators.- Returns:
- the AWT
Buttonthat pops the menu on click
-
addHelpEntry
-
applyLut
Applies a named ImageJ LUT to the palette image."reset"restores the source image's first LUT (preserving the palette image's current min/max). Other names are forwarded toLutLoader.getLut(String). -
updateMip
public void updateMip()Refreshes the MIP overlay (if currently shown) so it picks up LUT/min/max changes.
-