Class ChooseDatasetCmd

java.lang.Object
org.scijava.module.AbstractModule
org.scijava.module.DefaultMutableModule
org.scijava.command.DynamicCommand
sc.fiji.snt.gui.cmds.CommonDynamicCmd
sc.fiji.snt.gui.cmds.ChooseDatasetCmd
All Implemented Interfaces:
Runnable, org.scijava.Cancelable, org.scijava.command.Command, org.scijava.Contextual, org.scijava.module.Module, org.scijava.module.MutableModule, org.scijava.plugin.SciJavaPlugin
Direct Known Subclasses:
LoadSeedsFromLabelsImageCmd

public class ChooseDatasetCmd extends CommonDynamicCmd
Implements the 'Choose Tracing Image (From Open Image)...' command.
Author:
Tiago Ferreira
  • Constructor Details

    • ChooseDatasetCmd

      public ChooseDatasetCmd()
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface org.scijava.module.MutableModule
      Specified by:
      run in interface Runnable
      Overrides:
      run in class CommonDynamicCmd
    • isCalibrationCompatible

      protected boolean isCalibrationCompatible(ij.ImagePlus chosenImp)
    • init

      protected void init()
    • populateImpChoices

      protected boolean populateImpChoices(Predicate<ij.ImagePlus> accept)
      Populates impMap and the "choice" parameter's widget with the titles of all open ImagePlus instances, excluding the SNT main tracing image (when present) and any image rejected by the optional filter. Also updates accessToValidImagePlus.
      Parameters:
      accept - optional predicate; only images for which accept.test(imp) is true are included. null accepts every open image other than the tracing image.
      Returns:
      true if at least one candidate remains; false if none are available, in which case noImgsOpenError() has already been called.
    • getImpInstances

      public static Collection<ij.ImagePlus> getImpInstances()
    • getCurrentImage

      public static ij.ImagePlus getCurrentImage()
    • convertInPlaceToCompositeAsNeeded

      protected static ij.ImagePlus convertInPlaceToCompositeAsNeeded(SNTUI ui, ij.ImagePlus imp)
    • main

      public static void main(String... args)