Skip to content

Commit

Permalink
WIP: LUTs
Browse files Browse the repository at this point in the history
  • Loading branch information
haesleinhuepf committed Jul 26, 2020
1 parent 66e7b1d commit 71a48d6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,6 @@ public void mouseReleased(MouseEvent e) {


IJ.run(my_target, "Enhance Contrast", "saturated=0.35");

if (this.getClass().getSimpleName().toLowerCase().contains("label")) {
IncubatorUtilities.glasbey(my_target);
} else {
//my_target.setLut(my_source.getProcessor().getLut());
}

} else {
ImagePlus output = result;
double min = my_target.getDisplayRangeMin();
Expand All @@ -346,8 +339,17 @@ public void mouseReleased(MouseEvent e) {
//my_target.setLut(lut[0]);
my_target.setDisplayRange(min, max);
}
paused = false;
IncubatorUtilities.transferCalibration(my_source, my_target);
String name_to_consider = (my_source.getTitle() + " " + my_target.getTitle()).toLowerCase();

if (name_to_consider.contains("map") || name_to_consider.contains("mesh") ) {
IncubatorUtilities.fire(my_target);
} else if (name_to_consider.contains("label")) {
IncubatorUtilities.glasbey(my_target);
} else {
//my_target.setLut(my_source.getProcessor().getLut());
}
paused = false;
}

protected void handlePopupMenu(MouseEvent e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,24 @@ public void run() {
}
}

public static void fire(ImagePlus imp) {
//System.out.println();
String dir = IJ.getDirectory("imagej");
if (!dir.contains("null")) {

new java.util.Timer().schedule(
new java.util.TimerTask() {
@Override
public void run() {
IJ.run(imp, "Green Fire Blue", "");
imp.resetDisplayRange();
}
},
300
);

}
}

public static boolean ignoreEvent = false;

Expand Down

0 comments on commit 71a48d6

Please sign in to comment.