Skip to content

Commit

Permalink
Color mapping of paths: disable non-applicable option in GUI prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
tferr committed Sep 14, 2024
1 parent 827c97f commit 438a2e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/sc/fiji/snt/analysis/SkeletonConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,8 @@ public void setMaxConnectDist(double maxConnectDist) {
private void assignToImage(final Tree tree) {
final String fProp = imp.getProp("extracted-frame");
final String cProp = imp.getProp("extracted-channel");
final int f = (fProp == null) ? 1 : Integer.valueOf(fProp);
final int c = (cProp == null) ? 1 : Integer.valueOf(cProp);
final int f = (fProp == null) ? 1 : Integer.parseInt(fProp);
final int c = (cProp == null) ? 1 : Integer.parseInt(cProp);
tree.list().forEach(path -> path.setCTposition(c, f));
tree.assignImage(imp);
}
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/sc/fiji/snt/gui/cmds/FigCreatorCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public class FigCreatorCmd extends CommonDynamicCmd {
@Parameter(required = false)
boolean noRasterOutput;

@Parameter(required = false)
boolean noGeodesicTransformation;

@SuppressWarnings("unused")
private void init() {
super.init(false);
Expand All @@ -107,6 +110,12 @@ private void init() {
choices.remove(0);
mi.setChoices(choices);
}
if (noGeodesicTransformation) {
final MutableModuleItem<String> mi = (MutableModuleItem<String>) getInfo().getInput("uprightRotation", String.class);
final ArrayList<String> choices = new ArrayList<>(mi.getChoices());
choices.remove(1);
mi.setChoices(choices);
}
}


Expand Down
1 change: 1 addition & 0 deletions src/main/java/sc/fiji/snt/plugin/TreeMapperCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public void run() {
inputs.put("trees", trees);
inputs.put("mapper", mapper);
inputs.put("noRasterOutput", true);
inputs.put("noGeodesicTransformation", onlyConnectivitySafeMetrics);
getContext().getService(CommandService.class).run(FigCreatorCmd.class, true, inputs);
}
SNTUtils.log("Finished...");
Expand Down

0 comments on commit 438a2e2

Please sign in to comment.