Class LabelToValuePlugin

java.lang.Object
inra.ijpb.plugins.LabelToValuePlugin
All Implemented Interfaces:
ij.gui.DialogListener, ij.plugin.PlugIn

public class LabelToValuePlugin
extends java.lang.Object
implements ij.plugin.PlugIn, ij.gui.DialogListener
Combines a label image and the values within a column of a results table to create a new image with intensity corresponding to the vales in the table column.
Author:
dlegland
  • Constructor Summary

    Constructors
    Constructor Description
    LabelToValuePlugin()  
  • Method Summary

    Modifier and Type Method Description
    boolean dialogItemChanged​(ij.gui.GenericDialog gd, java.awt.AWTEvent evt)  
    static ij.ImagePlus process​(ij.ImagePlus labelImage, ij.measure.ResultsTable table, java.lang.String columnName)
    Combines a label image and the values within a column of a ResultsTable to generate a parametric map of values that associates to each pixel / voxel the value of the row associated to the label it belongs to.
    static ij.ImagePlus process​(ij.ImagePlus labelImage, ij.measure.ResultsTable table, java.lang.String columnName, double minValue, double maxValue)
    Combines a label image and the values within a column of a ResultsTable to generate a parametric map of values that associates to each pixel / voxel the value of the row associated to the label it belongs to.
    static void process​(java.lang.String tableNameArg, java.lang.String columnNameArg, java.lang.String minValueArg, java.lang.String maxValueArg)
    Process the current image as a label image using the provided string arguments.
    static void record​(java.lang.String command, java.lang.String... args)
    Macro-record a specific command.
    void run​(java.lang.String arg0)  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LabelToValuePlugin

      public LabelToValuePlugin()
  • Method Details

    • run

      public void run​(java.lang.String arg0)
      Specified by:
      run in interface ij.plugin.PlugIn
    • dialogItemChanged

      public boolean dialogItemChanged​(ij.gui.GenericDialog gd, java.awt.AWTEvent evt)
      Specified by:
      dialogItemChanged in interface ij.gui.DialogListener
    • process

      public static final ij.ImagePlus process​(ij.ImagePlus labelImage, ij.measure.ResultsTable table, java.lang.String columnName)
      Combines a label image and the values within a column of a ResultsTable to generate a parametric map of values that associates to each pixel / voxel the value of the row associated to the label it belongs to. Background pixels are associated to the value Float.NaN.
      Parameters:
      labelImage - the image containing the regions labels
      table - the ResultsTable containing the values to map
      columnName - the name of the column containing the values to map (one row per label)
      Returns:
      a new 32-bit float image containing the values associated to each label
    • process

      public static final ij.ImagePlus process​(ij.ImagePlus labelImage, ij.measure.ResultsTable table, java.lang.String columnName, double minValue, double maxValue)
      Combines a label image and the values within a column of a ResultsTable to generate a parametric map of values that associates to each pixel / voxel the value of the row associated to the label it belongs to. Background pixels are associated to the value Float.NaN.
      Parameters:
      labelImage - the image containing the regions labels
      table - the ResultsTable containing the values to map
      columnName - the name of the column containing the values to map (one row per label)
      minValue - the value that will be displayed in black
      maxValue - the value that will be displayed in white
      Returns:
      a new 32-bit float image containing the values associated to each label
    • record

      public static final void record​(java.lang.String command, java.lang.String... args)
      Macro-record a specific command. The command names match the static methods that reproduce that part of the code.
      Parameters:
      command - name of the command including package info
      args - set of arguments for the command
    • process

      public static final void process​(java.lang.String tableNameArg, java.lang.String columnNameArg, java.lang.String minValueArg, java.lang.String maxValueArg)
      Process the current image as a label image using the provided string arguments. This method is intended to be called from macro, using the command line generated by the "record" method.
      Parameters:
      tableNameArg - the name of the result table to use
      columnNameArg - the name of the column (within the table) containing the values
      minValueArg - the minimal value to display as black in result image
      maxValueArg - the maximal value to display as white in result image
      See Also:
      record(String, String...), process(ImagePlus, ResultsTable, String, double, double)