Created
June 26, 2020 13:06
-
-
Save mutterer/5fc71706fd095ef90026a38ab6da6f89 to your computer and use it in GitHub Desktop.
ImageJ macro that reads calibration from "AMT Camera System" image metadata and applies it to the current image.
This file contains 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
List.setList( getMetadata( "Info" ) ); | |
desc = List.get( "ImageDescription" ); | |
if( desc.indexOf( "AMT" )< 0 ) { | |
print( "Not an AMT image file" ); | |
exit( ); | |
} | |
unit = List.get( "Unit" ); | |
cal = List.get( "XpixCal" ); | |
cal = parseFloat( cal.replace( ',', '.' ) ); | |
setVoxelSize( 1 / cal, 1 / cal, 1, unit ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment