Hi ImageJers,
My macro uses the information reported by the debugger to open a single, very large TIFF. I do: run("Misc...", "divide=Infinity debug"); to get file information from FileOpener needed for a call to run("Raw"..."use"). On my versions of ImageJ (1.44-1.47, MacOS 10.7.4, Java 1.6.0) the debugger gives very different information than when run on some Windows systems (Win 8). For example, the image data type is wrong (byte vs ushort), the offset is different, and it thinks the TIFF image data were written on a big-endian system. Does anyone know of a way to force ImageJ's debugger to report the same information as before (i.e., including the offset tag value)? I tried to use the TIFF Virtual Stack opener, as Wayne and some listers suggested last year but this opens the image with it's original dimensons, while using run("Raw"..."use") allows us to treat a really large 16-bit TIFF as if it were a series of narrow horizontal strips (say 1000 high x 16,000 wide). This is a really neat functionality and since a smaller "strip" is loaded, it takes less memory. The issue is not simply opening the TIFF as a Virtual Stack (with Bio-Formats or other plugin), it's having the flexibility to open it in any way desired. I tried using tiff_tags.jar but it does not report the offset value. Ideally the TIFF Virtual Stack would allow us to interpret the image with different, user-selected dimensions (rows x columns x layers). Mark Mark Chopping, Ph.D. Montclair State University ----- Debugger example 1, Mac 1.47, MacOS 10.7.4, Java 1.6.0): openImage: "tif", /Users/mark/CANAPI_RS_MATERIALS/r2c2_tkss.tif r2c2_tkss.tif: opening 256, "ImageWidth", value=2026 257, "ImageLength", value=3417 258, "BitsPerSample", value=16 259, "Compression", value=1 262, "PhotoInterp", value=1 273, "StripOffsets", value=13860666, count=1709 274, "Orientation", value=1 277, "SamplesPerPixel", value=1 278, "RowsPerStrip", value=2 279, "StripByteCount", value=13867502, count=1709 282, "XResolution", value=13874338 283, "YResolution", value=13874346 284, "PlanarConfiguration", value=1 296, "ResolutionUnit", value=1 305, "Software", value=13874354, count=164 339, "SampleFormat", value=1 33550, "???", value=13874518, count=3 33922, "???", value=13874542, count=6 34735, "???", value=13874590, count=28 34737, "???", value=13874646, count=502 nextIFD=0 number of images: 1 offset to first image: 8 gap between images: 0 little-endian byte order: true Debugger example 2, some of my students (ImageJ 1.47-1.48, Windows 8): openImage: "tif", C:\Users\DarkMatter\Desktop\Canopy Exercise/r2c2_tkss.tif r2c2_tkss.tif: opening 254, "NewSubfileType", value=0 256, "ImageWidth", value=2026 257, "ImageLength", value=3417 258, "BitsPerSample", value=8 262, "PhotoInterp", value=1 270, "ImageDescription", value=158, count=14 273, "StripOffsets", value=540 277, "SamplesPerPixel", value=1 278, "RowsPerStrip", value=3417 279, "StripByteCount", value=6922842 50838, "MetaDataByteCounts", value=172, count=2 50839, "MetaData", value=180, count=360 Metadata: 0 696e666f 1 (Info property) nextIFD=0 number of images: 1 offset to first image: 540 gap between images: 0 little-endian byte order: false --- end ----- -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
On Oct 20, 2014, at 11:54 AM, Mark J. Chopping <[hidden email]> wrote:
> > Hi ImageJers, > > My macro uses the information reported by the debugger to open a single, very large TIFF. I do: > > run("Misc...", "divide=Infinity debug"); > > to get file information from FileOpener needed for a call to run("Raw"..."use"). On my versions of ImageJ (1.44-1.47, MacOS 10.7.4, Java 1.6.0) the debugger gives very different information than when run on some Windows systems (Win 8). For example, the image data type is wrong (byte vs ushort), the offset is different, and it thinks the TIFF image data were written on a big-endian system. > > Does anyone know of a way to force ImageJ's debugger to report the same information as before (i.e., including the offset tag value)? I am not able to reproduce this problem. Please provide an example image that exhibits the problem. As a test, I used File>New>Image to create a 10000x10000 16-bit ramp image (191MB), saved it as a tiff and opened it with ImageJ in debug mode using v1.44, v1.47 and 1.49. In all cases the debugger reported the same information: offset: 148 type: ushort byte order: little-endian ImageJ saved the image using little-endian byte order because I had “Save TIFF and raw in Intel byte order” enabled in Edit>Options>Input/Output. > I tried to use the TIFF Virtual Stack opener, as Wayne and some listers suggested last year but this opens the image with it's original dimensons, while using run("Raw"..."use") allows us to treat a really large 16-bit TIFF as if it were a series of narrow horizontal strips (say 1000 high x 16,000 wide). This is a really neat functionality and since a smaller "strip" is loaded, it takes less memory. I was able to open the 10000x10000 test image as a 10-slice virtual stack using the File>Import>Raw command using these settings: Image type: 16-bit Unsigned Width: 10000 Height: 1000 Offset to first image: 168 Number of images: 10 Little-endian byte order Use virtual stack > The issue is not simply opening the TIFF as a Virtual Stack (with Bio-Formats or other plugin), it's having the flexibility to open it in any way desired. I tried using tiff_tags.jar but it does not report the offset value. Ideally the TIFF Virtual Stack would allow us to interpret the image with different, user-selected dimensions (rows x columns x layers). > > Mark > > Mark Chopping, Ph.D. > Montclair State University > > ----- > > Debugger example 1, Mac 1.47, MacOS 10.7.4, Java 1.6.0): > > openImage: "tif", /Users/mark/CANAPI_RS_MATERIALS/r2c2_tkss.tif > > r2c2_tkss.tif: opening > 256, "ImageWidth", value=2026 > 257, "ImageLength", value=3417 > 258, "BitsPerSample", value=16 > 259, "Compression", value=1 > 262, "PhotoInterp", value=1 > 273, "StripOffsets", value=13860666, count=1709 > 274, "Orientation", value=1 > 277, "SamplesPerPixel", value=1 > 278, "RowsPerStrip", value=2 > 279, "StripByteCount", value=13867502, count=1709 > 282, "XResolution", value=13874338 > 283, "YResolution", value=13874346 > 284, "PlanarConfiguration", value=1 > 296, "ResolutionUnit", value=1 > 305, "Software", value=13874354, count=164 > 339, "SampleFormat", value=1 > 33550, "???", value=13874518, count=3 > 33922, "???", value=13874542, count=6 > 34735, "???", value=13874590, count=28 > 34737, "???", value=13874646, count=502 > nextIFD=0 > number of images: 1 > offset to first image: 8 > gap between images: 0 > little-endian byte order: true > > > Debugger example 2, some of my students (ImageJ 1.47-1.48, Windows 8): > > openImage: "tif", C:\Users\DarkMatter\Desktop\Canopy Exercise/r2c2_tkss.tif > > r2c2_tkss.tif: opening > 254, "NewSubfileType", value=0 > 256, "ImageWidth", value=2026 > 257, "ImageLength", value=3417 > 258, "BitsPerSample", value=8 > 262, "PhotoInterp", value=1 > 270, "ImageDescription", value=158, count=14 > 273, "StripOffsets", value=540 > 277, "SamplesPerPixel", value=1 > 278, "RowsPerStrip", value=3417 > 279, "StripByteCount", value=6922842 > 50838, "MetaDataByteCounts", value=172, count=2 > 50839, "MetaData", value=180, count=360 > Metadata: > 0 696e666f 1 (Info property) > nextIFD=0 > number of images: 1 > offset to first image: 540 > gap between images: 0 > little-endian byte order: false > > --- end ----- -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Wayne,
The Log output was sent by a student using version 1.48 on a windows 8 PC. I will send you a link to the image under separate cover; it is possible that there is something odd about it that causes the Debug information to be different. Thanks much for your help with this. Best wishes, Mark ---- > Date: Mon, 20 Oct 2014 17:28:59 +0000 > From: "Rasband, Wayne (NIH/NIMH) [E]" <[hidden email]> > Reply-To: [hidden email] > To: [hidden email] > Subject: Re: ImageJ Debugger anomaly/TIFF offset tag > > On Oct 20, 2014, at 11:54 AM, Mark J. Chopping <[hidden email]> wrote: >> >> Hi ImageJers, >> >> My macro uses the information reported by the debugger to open a single, very large TIFF. I do: >> >> run("Misc...", "divide=Infinity debug"); >> >> to get file information from FileOpener needed for a call to run("Raw"..."use"). On my versions of ImageJ (1.44-1.47, MacOS 10.7.4, Java 1.6.0) the debugger gives very different information than when run on some Windows systems (Win 8). For example, the image data type is wrong (byte vs ushort), the offset is different, and it thinks the TIFF image data were written on a big-endian system. >> >> Does anyone know of a way to force ImageJ's debugger to report the same information as before (i.e., including the offset tag value)? > > I am not able to reproduce this problem. Please provide an example image that exhibits the problem. As a test, I used File>New>Image to create a 10000x10000 16-bit ramp image (191MB), saved it as a tiff and opened it with ImageJ in debug mode using v1.44, v1.47 and 1.49. In all cases the debugger reported the same information: > > offset: 148 > type: ushort > byte order: little-endian > > ImageJ saved the image using little-endian byte order because I had “Save TIFF and raw in Intel byte order” enabled in Edit>Options>Input/Output. > >> I tried to use the TIFF Virtual Stack opener, as Wayne and some listers suggested last year but this opens the image with it's original dimensons, while using run("Raw"..."use") allows us to treat a really large 16-bit TIFF as if it were a series of narrow horizontal strips (say 1000 high x 16,000 wide). This is a really neat functionality and since a smaller "strip" is loaded, it takes less memory. > > I was able to open the 10000x10000 test image as a 10-slice virtual stack using the File>Import>Raw command using these settings: > > Image type: 16-bit Unsigned > Width: 10000 > Height: 1000 > Offset to first image: 168 > Number of images: 10 > Little-endian byte order > Use virtual stack > > >> The issue is not simply opening the TIFF as a Virtual Stack (with Bio-Formats or other plugin), it's having the flexibility to open it in any way desired. I tried using tiff_tags.jar but it does not report the offset value. Ideally the TIFF Virtual Stack would allow us to interpret the image with different, user-selected dimensions (rows x columns x layers). >> >> Mark >> >> Mark Chopping, Ph.D. >> Montclair State University >> >> ----- >> >> Debugger example 1, Mac 1.47, MacOS 10.7.4, Java 1.6.0): >> >> openImage: "tif", /Users/mark/CANAPI_RS_MATERIALS/r2c2_tkss.tif >> >> r2c2_tkss.tif: opening >> 256, "ImageWidth", value=2026 >> 257, "ImageLength", value=3417 >> 258, "BitsPerSample", value=16 >> 259, "Compression", value=1 >> 262, "PhotoInterp", value=1 >> 273, "StripOffsets", value=13860666, count=1709 >> 274, "Orientation", value=1 >> 277, "SamplesPerPixel", value=1 >> 278, "RowsPerStrip", value=2 >> 279, "StripByteCount", value=13867502, count=1709 >> 282, "XResolution", value=13874338 >> 283, "YResolution", value=13874346 >> 284, "PlanarConfiguration", value=1 >> 296, "ResolutionUnit", value=1 >> 305, "Software", value=13874354, count=164 >> 339, "SampleFormat", value=1 >> 33550, "???", value=13874518, count=3 >> 33922, "???", value=13874542, count=6 >> 34735, "???", value=13874590, count=28 >> 34737, "???", value=13874646, count=502 >> nextIFD=0 >> number of images: 1 >> offset to first image: 8 >> gap between images: 0 >> little-endian byte order: true >> >> >> Debugger example 2, some of my students (ImageJ 1.47-1.48, Windows 8): >> >> openImage: "tif", C:\Users\DarkMatter\Desktop\Canopy Exercise/r2c2_tkss.tif >> >> r2c2_tkss.tif: opening >> 254, "NewSubfileType", value=0 >> 256, "ImageWidth", value=2026 >> 257, "ImageLength", value=3417 >> 258, "BitsPerSample", value=8 >> 262, "PhotoInterp", value=1 >> 270, "ImageDescription", value=158, count=14 >> 273, "StripOffsets", value=540 >> 277, "SamplesPerPixel", value=1 >> 278, "RowsPerStrip", value=3417 >> 279, "StripByteCount", value=6922842 >> 50838, "MetaDataByteCounts", value=172, count=2 >> 50839, "MetaData", value=180, count=360 >> Metadata: >> 0 696e666f 1 (Info property) >> nextIFD=0 >> number of images: 1 >> offset to first image: 540 >> gap between images: 0 >> little-endian byte order: false >> >> --- end ----- > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |