We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using Tiff image = Tiff.Open("demo.tif", "r"); StringBuilder sb = new(); foreach (TiffTag tag in Enum.GetValues(typeof(TiffTag))) { FieldValue[] values = image.GetField(tag); if (values is null) continue; foreach (FieldValue value in values) sb.AppendLine($"{tag} = {value}"); } Console.WriteLine(sb);
SUBFILETYPE = 0 IMAGEWIDTH = 256 IMAGELENGTH = 256 BITSPERSAMPLE = 16 COMPRESSION = NONE PHOTOMETRIC = MINISBLACK IMAGEDESCRIPTION = ImageJ=1.53q images=48 channels=2 frames=24 hyperstack=true mode=composite unit=micron finterval=1 loop=false min=169.0 max=8191.0 STRIPOFFSETS = System.UInt64[] SAMPLESPERPIXEL = 1 ROWSPERSTRIP = 16 STRIPBYTECOUNTS = System.UInt64[] XRESOLUTION = 0.848324 YRESOLUTION = 0.848324 PLANARCONFIG = CONTIG RESOLUTIONUNIT = NONE TILEOFFSETS = System.UInt64[] TILEBYTECOUNTS = System.UInt64[]
public static double GetMicronsPerPixel(string tifFilePath) { using Tiff image = Tiff.Open(tifFilePath, "r"); return 1.0 / (float)image.GetField(TiffTag.XRESOLUTION).First().Value; }
metrics of interest:
unit=micron XRESOLUTION = 0.848324 YRESOLUTION = 0.848324
The text was updated successfully, but these errors were encountered:
No branches or pull requests
metrics of interest:
The text was updated successfully, but these errors were encountered: