Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI tweaks #301

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Legacy/bonej/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<name>BoneJ legacy plugins</name>
<description>Mavenized version of the BoneJ1 plugins</description>
<url>https://imagej.github.io/plugins/bonej</url>
<url>https://imagej.net/plugins/bonej</url>
<inceptionYear>2015</inceptionYear>
<organization>
<name>Royal Veterinary College</name>
Expand Down
1 change: 1 addition & 0 deletions Legacy/bonej/src/main/java/org/bonej/plugins/Moments.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public void run(final String arg) {
gd.addCheckbox("Show axes (3D)", true);
gd.addCheckbox("Record unit vectors", false);
gd.addDialogListener(this);
gd.addHelp("https://imagej.net/plugins/bonej#moments-of-inertia");
gd.showDialog();
if (gd.wasCanceled()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void run(final String arg) {
gd.addChoice("Surface colours", items, items[0]);
gd.addNumericField("Split value", 0, 3, 7, units + "³");
gd.addNumericField("Volume_resampling", 2, 0);
gd.addHelp("https://imagej.github.io/plugins/bonej#particle-analyser");
gd.addHelp("https://imagej.net/plugins/bonej#particle-analyser");
gd.addDialogListener(this);
gd.showDialog();
if (gd.wasCanceled()) {
Expand Down
1 change: 1 addition & 0 deletions Legacy/bonej/src/main/java/org/bonej/plugins/Purify.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void run(final String arg) {
final GenericDialog gd = new GenericDialog("Setup");
gd.addCheckbox("Performance Log", false);
gd.addCheckbox("Make_copy", true);
gd.addHelp("https://imagej.net/plugins/bonej#purify");
gd.showDialog();
if (gd.wasCanceled()) return;
final boolean showPerformance = gd.getNextBoolean();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void run(final String arg) {
"and promote BoneJ to funders.");
dialog.addMessage("If you agree to participate please hit OK\n" +
"otherwise, cancel. For more information click Help.");
dialog.addHelp("https://imagej.github.io/plugins/bonej#usage-reporting");
dialog.addHelp("https://imagej.net/plugins/bonej#usage-reporting");
dialog.showDialog();
if (dialog.wasCanceled()) {
Prefs.set(OPTOUTKEY, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ else if (roi.getType() != Roi.RECTANGLE) {
gd.addCheckbox("Partial_volume_compensation", false);
gd.addNumericField("Background", thresholds[0], 1, 6, pixUnits + " ");
gd.addNumericField("Foreground", thresholds[1], 1, 6, pixUnits + " ");
gd.addHelp("https://imagej.github.io/plugins/bonej#slice-geometry");
gd.addHelp("https://imagej.net/plugins/bonej#slice-geometry");
gd.addDialogListener(this);
gd.showDialog();
final String bone = gd.getNextChoice();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public void run(final String arg) {
gd.addCheckbox("Add_to_ROI_Manager", false);
gd.addCheckbox("Clear_ROI_Manager", false);
gd.addDialogListener(this);
gd.addHelp("https://imagej.net/plugins/bonej#fit-sphere");
gd.showDialog();
if (gd.wasCanceled()) {
return;
Expand Down
6 changes: 3 additions & 3 deletions Legacy/bonej/src/main/resources/plugins.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
###
# Author: Michael Doube

Plugins>BoneJ>Analyze, "Calibrate SCANCO", org.bonej.plugins.DensityCalibrator("scanco")
Plugins>BoneJ>Analyze, "Orientation", org.bonej.plugins.Orienteer
Plugins>BoneJ>Analyze, "Particle Analyser", org.bonej.plugins.ParticleCounter
Plugins>BoneJ>Analyse, "Calibrate SCANCO", org.bonej.plugins.DensityCalibrator("scanco")
Plugins>BoneJ>Analyse, "Orientation", org.bonej.plugins.Orienteer
Plugins>BoneJ>Analyse, "Particle Analyser", org.bonej.plugins.ParticleCounter

Plugins>BoneJ>Connectivity, "Connectivity", org.bonej.plugins.Connectivity

Expand Down
2 changes: 1 addition & 1 deletion Legacy/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<name>BoneJ legacy utilities</name>
<description>Utility classes for BoneJ1 plugins</description>
<url>https://imagej.github.io/plugins/bonej</url>
<url>https://imagej.net/plugins/bonej</url>
<inceptionYear>2015</inceptionYear>
<organization>
<name>Royal Veterinary College</name>
Expand Down
2 changes: 1 addition & 1 deletion Modern/ops/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<name>BoneJ2 Ops</name>
<description>Ops created for BoneJ2</description>
<url>https://imagej.github.io/plugins/bonej</url>
<url>https://imagej.net/plugins/bonej</url>
<inceptionYear>2015</inceptionYear>
<organization>
<name>Royal Veterinary College</name>
Expand Down
2 changes: 1 addition & 1 deletion Modern/utilities/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<name>BoneJ2 utilities</name>
<description>Utility methods for BoneJ2</description>
<url>https://imagej.github.io/plugins/bonej</url>
<url>https://imagej.net/plugins/bonej</url>
<inceptionYear>2015</inceptionYear>
<organization>
<name>Royal Veterinary College</name>
Expand Down
2 changes: 1 addition & 1 deletion Modern/wrapperPlugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
The Domain Presentation Layer (DPL) of BoneJ2, i.e. the commands that wrap the needed ops,
and present results for skeletal biologists.
</description>
<url>https://imagej.github.io/plugins/bonej</url>
<url>https://imagej.net/plugins/bonej</url>
<inceptionYear>2015</inceptionYear>
<organization>
<name>Royal Veterinary College</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.bonej.utilities.AxisUtils;
import org.bonej.utilities.ImagePlusUtil;
import org.bonej.utilities.SharedTable;
import org.bonej.wrapperPlugins.wrapperUtils.Common;
import org.scijava.ItemIO;
import org.scijava.ItemVisibility;
import org.scijava.app.StatusService;
Expand All @@ -88,13 +89,15 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.scijava.io.IOService;
import org.scijava.io.location.FileLocation;
import org.scijava.log.LogService;
import org.scijava.platform.PlatformService;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import org.scijava.table.DefaultGenericTable;
import org.scijava.table.DoubleColumn;
import org.scijava.table.IntColumn;
import org.scijava.table.PrimitiveColumn;
import org.scijava.ui.UIService;
import org.scijava.widget.Button;
import org.scijava.widget.ChoiceWidget;
import org.scijava.widget.FileWidget;

Expand Down Expand Up @@ -150,6 +153,9 @@ public class AnalyseSkeletonWrapper extends BoneJCommand {
description = "Show skeleton images labelled with their IDs",
required = false)
private boolean displaySkeletons;

@Parameter(label = "Help", description = "More about Analyse Skeleton", callback = "showHelpPage")
private Button button;

/**
* Additional analysis details in a {@link DefaultGenericTable}, null if
Expand Down Expand Up @@ -189,7 +195,10 @@ public class AnalyseSkeletonWrapper extends BoneJCommand {

@Parameter
private StatusService statusService;


@Parameter
private PlatformService platformService;

private ImagePlus intensityImage;

@Override
Expand Down Expand Up @@ -231,6 +240,11 @@ public void run() {
}
reportUsage();
}

@SuppressWarnings("unused")
private void showHelpPage() {
Common.showHelpPage("#analyse-skeleton", platformService, uiService, logService);
}

private boolean hasNoSkeletons(final AnalyzeSkeleton_ analyzeSkeleton_) {
final Graph[] graphs = analyzeSkeleton_.getGraphs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.bonej.utilities.ElementUtil;
import org.bonej.utilities.SharedTable;
import org.bonej.utilities.Visualiser;
import org.bonej.wrapperPlugins.wrapperUtils.Common;
import org.bonej.wrapperPlugins.wrapperUtils.HyperstackUtils.Subspace;
import org.joml.Matrix3d;
import org.joml.Matrix4d;
Expand All @@ -112,10 +113,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.scijava.app.StatusService;
import org.scijava.command.Command;
import org.scijava.log.LogService;
import org.scijava.platform.PlatformService;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import org.scijava.ui.DialogPrompt.Result;
import org.scijava.ui.UIService;
import org.scijava.widget.Button;
import org.scijava.widget.NumberWidget;

/**
Expand Down Expand Up @@ -194,6 +197,9 @@ public class AnisotropyWrapper<T extends RealType<T> & NativeType<T>> extends Bo
description = "Show the vectors of the mean intercept lengths",
required = false)
private boolean displayMILVectors;

@Parameter(label = "Help", description = "More about Anisotropy", callback = "showHelpPage")
private Button button;

@Parameter
private LogService logService;
Expand All @@ -205,6 +211,8 @@ public class AnisotropyWrapper<T extends RealType<T> & NativeType<T>> extends Bo
private UIService uiService;
@Parameter
private UnitService unitService;
@Parameter
private PlatformService platformService;
private static BinaryHybridCFI1<Vector3d, Quaterniondc, Vector3d> rotateOp;
private double milLength;

Expand All @@ -229,6 +237,11 @@ public void run() {
resultsTable = SharedTable.getTable();
reportUsage();
}

@SuppressWarnings("unused")
private void showHelpPage() {
Common.showHelpPage("#anisotropy", platformService, uiService, logService);
}

// region -- Helper methods --
private void calculateMILLength(final RandomAccessibleInterval<BitType> interval) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.scijava.app.StatusService;
import org.scijava.command.Command;
import org.scijava.log.LogService;
import org.scijava.platform.PlatformService;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import org.scijava.ui.UIService;
import org.scijava.widget.Button;

import sc.fiji.skeletonize3D.Skeletonize3D_;

Expand Down Expand Up @@ -166,6 +168,8 @@ public class EllipsoidFactorWrapper extends BoneJCommand {
@SuppressWarnings("unused")
@Parameter
private UnitService unitService;
@Parameter
private PlatformService platformService;
//main input image
@SuppressWarnings("unused")
@Parameter(validater = "validateImage")
Expand Down Expand Up @@ -213,7 +217,9 @@ public class EllipsoidFactorWrapper extends BoneJCommand {
private List<ImgPlus> ellipsoidFactorOutputImages;
@Parameter(label = "Seed Points", type = ItemIO.OUTPUT)
private ImgPlus<ByteType> seedPointImage;// 0=not a seed, 1=medial seed

@Parameter(label = "Help", description = "More about Ellipsoid Factor", callback = "showHelpPage")
private Button button;

private ImgPlus<BitType> inputAsBitType;

@Override
Expand Down Expand Up @@ -341,6 +347,11 @@ public void run() {
statusService.showStatus("Ellipsoid Factor completed");
reportUsage();
}

@SuppressWarnings("unused")
private void showHelpPage() {
Common.showHelpPage("#ellipsoid-factor", platformService, uiService, logService);
}

private List<ImgPlus> divideOutput(final List<ImgPlus> outputList, final int repetitions) {
final List<ImgPlus> divided = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,20 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.apache.commons.math3.stat.regression.SimpleRegression;
import org.bonej.utilities.ElementUtil;
import org.bonej.utilities.SharedTable;
import org.bonej.wrapperPlugins.wrapperUtils.Common;
import org.bonej.wrapperPlugins.wrapperUtils.HyperstackUtils.Subspace;
import org.scijava.ItemIO;
import org.scijava.app.StatusService;
import org.scijava.command.Command;
import org.scijava.log.LogService;
import org.scijava.platform.PlatformService;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import org.scijava.table.DefaultGenericTable;
import org.scijava.table.DoubleColumn;
import org.scijava.table.GenericTable;
import org.scijava.ui.UIService;
import org.scijava.widget.Button;
import org.scijava.widget.NumberWidget;

/**
Expand Down Expand Up @@ -147,6 +152,9 @@ public class FractalDimensionWrapper<T extends RealType<T> & NativeType<T>> exte
@Parameter(label = "Show points",
description = "Show (log(size), -log(count)) points", required = false)
private boolean showPoints;

@Parameter(label = "Help", description = "More about Fractal Dimension", callback = "showHelpPage")
private Button button;

/**
* Table containing the (-log(size), log(count)) points for each 3D subspace
Expand All @@ -158,6 +166,12 @@ public class FractalDimensionWrapper<T extends RealType<T> & NativeType<T>> exte
private OpService opService;
@Parameter
private StatusService statusService;
@Parameter
private LogService logService;
@Parameter
private UIService uiService;
@Parameter
private PlatformService platformService;

private BinaryHybridCF<RandomAccessibleInterval<BitType>, Boolean, RandomAccessibleInterval<BitType>> hollowOp;
private UnaryFunctionOp<RandomAccessibleInterval<BitType>, List<ValuePair<DoubleType, DoubleType>>> boxCountOp;
Expand Down Expand Up @@ -194,6 +208,12 @@ public void run() {
resultsTable = SharedTable.getTable();
reportUsage();
}

@SuppressWarnings("unused")
private void showHelpPage() {
Common.showHelpPage("#fractal-dimension", platformService, uiService, logService);
}


// region -- Helper methods --
private void writePoints(final String headerSuffix,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import org.scijava.ItemIO;
import org.scijava.app.StatusService;
import org.scijava.command.Command;
import org.scijava.log.LogService;
import org.scijava.platform.PlatformService;
import org.scijava.plugin.Parameter;
import org.scijava.plugin.Plugin;
import org.scijava.table.DoubleColumn;
import org.scijava.table.Table;
import org.scijava.ui.UIService;
import org.scijava.widget.Button;
import org.scijava.widget.NumberWidget;

import sc.fiji.analyzeSkeleton.AnalyzeSkeleton_;
Expand Down Expand Up @@ -166,6 +169,7 @@ public class IntertrabecularAngleWrapper extends BoneJCommand {
description = "Print the percentage of each of the type of edges that were culled after calling analyseSkeleton",
required = false, persistKey = "ITA_print_culled_edges")
private boolean printCulledEdgePercentages;

/**
* The ITA edge-end coordinates in a {@link Table}, null if there are no
* results
Expand All @@ -174,10 +178,16 @@ public class IntertrabecularAngleWrapper extends BoneJCommand {
private ResultsTable centroidTable;
@Parameter(type = ItemIO.OUTPUT, label = "Edge culling percentages")
private ResultsTable culledEdgePercentagesTable;
@Parameter(label = "Help", description = "More about Intertrabecular Angles", callback = "showHelpPage")
private Button button;
@Parameter
private StatusService statusService;
@Parameter
private UIService uiService;
@Parameter
private LogService logService;
@Parameter
private PlatformService platformService;

private double[] coefficients;
private boolean anisotropyWarned;
Expand Down Expand Up @@ -219,6 +229,11 @@ public void run() {
printCulledEdgePercentages(pruningResult.b);
reportUsage();
}

@SuppressWarnings("unused")
private void showHelpPage() {
Common.showHelpPage("#inter-trabecular-angles", platformService, uiService, logService);
}

private void addResults(final Map<Integer, DoubleStream> anglesMap) {
final String label = inputImage.getTitle();
Expand Down
Loading