Created
February 18, 2021 08:12
-
-
Save mutterer/c616769fe9c4f988eb102df90be737c8 to your computer and use it in GitHub Desktop.
Applying LUTs when opening a file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// applying a defined LUTs sequence when opening a file. | |
// suggested by Debora Keller Olivier @olivier_debora | |
run("Action Bar","/plugins/ActionBar/open_with_lut.ijm"); | |
exit(); | |
<text><html><h2>Drop your image here</h2></html> | |
<line> | |
<button> | |
label=preferences... | |
arg=<macro> | |
s=call('ij.Prefs.get','openwithlut.luts',"Cyan,Magenta,Yellow,Grays"); | |
s=getString("LUTs sequence",s); | |
call('ij.Prefs.set','openwithlut.luts',s); | |
</macro> | |
</line> | |
<DnDAction> | |
f=getArgument(); | |
open(f); | |
s=call('ij.Prefs.get','openwithlut.luts',"Cyan,Magenta,Yellow,Grays"); | |
luts=split(s,','); | |
Stack.getDimensions(width, height, channels, slices, frames); | |
for(i=1;i<=channels;i++) { | |
Stack.setChannel(i); | |
run(luts[i-1]); | |
} | |
</DnDAction> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment