Skip to content

Instantly share code, notes, and snippets.

@mutterer
Created September 11, 2014 08:31
Show Gist options
  • Save mutterer/9a4f8a67f4ca8cd3ae82 to your computer and use it in GitHub Desktop.
Save mutterer/9a4f8a67f4ca8cd3ae82 to your computer and use it in GitHub Desktop.
Fix display range of multichannel images with bitdepth>8
// fixes the display range of lsm files with pixelDepth>8
macro "fix display range [f]" {
Stack.getDimensions(width, height, channels, slices, frames);
for (c=0;c<channels;c++){
Stack.setChannel(c+1);
getStatistics(area, mean, min, max, std, histogram);
setMinAndMax(min, max);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment