<div dir="ltr">Hi Ajeet,<div><br></div><div>[CCing scifio mailing list, which is the best place to discuss these sorts of file format issues.]</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">> Johannes, I have a tiff image stack of images all of different width and</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">> height. When reading with the bioformats importer, it assumes that all</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">> images are the same size and sets the width/height for all images to</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">> that of the first image. Curtis and I have filed a ticket to correct for</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">> this in the future, but is there a way to get the dimensions of an</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">> individual image in a tiff stack? (The first image in my stack is</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">> 1008x3008, and the last one is supposed to be like 40000x70000. I need</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">> the exact dimensions of the last image.)</span><br></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">For others' reference: </span><font face="arial, sans-serif"><a href="https://github.com/scifio/scifio/issues/159">https://github.com/scifio/scifio/issues/159</a></font></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Ajeet: SCIFIO has a low-level TIFF API you can use to do it:</span></div><div>
<font face="arial, sans-serif"><a href="https://github.com/scifio/scifio/blob/master/scifio/src/main/java/io/scif/formats/tiff/TiffParser.java">https://github.com/scifio/scifio/blob/master/scifio/src/main/java/io/scif/formats/tiff/TiffParser.java</a></font></div>
<div><font face="arial, sans-serif"><a href="https://github.com/scifio/scifio/blob/master/scifio/src/main/java/io/scif/formats/tiff/IFD.java">https://github.com/scifio/scifio/blob/master/scifio/src/main/java/io/scif/formats/tiff/IFD.java</a></font><br>
</div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">See in particular IFD#getImageWidth() and IFD#getImageHeight().</font></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Better would be to fix the bug in SCIFIO's TiffFormat, such that it reports a different Image per plane size. Want to try your hand at it? Mark and I would be happy to answer any technical questions.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">-Curtis</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sun, May 11, 2014 at 12:58 PM, Johannes Schindelin <span dir="ltr"><<a href="mailto:schindelin@wisc.edu" target="_blank">schindelin@wisc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Ajeet,<br>
<br>
On Sun, 11 May 2014, Ajeet Vivekanandan wrote:<br>
<br>
> I finished the Ventana ROI to WiscScan converter (FIJI/ImageJ plugin).<br>
> There is only one issue that I would need Johannes's help for, but I'm<br>
> ready to test/use this as soon as that's done.<br>
><br>
> Johannes, I have a tiff image stack of images all of different width and<br>
> height. When reading with the bioformats importer, it assumes that all<br>
> images are the same size and sets the width/height for all images to<br>
> that of the first image. Curtis and I have filed a ticket to correct for<br>
> this in the future, but is there a way to get the dimensions of an<br>
> individual image in a tiff stack? (The first image in my stack is<br>
> 1008x3008, and the last one is supposed to be like 40000x70000. I need<br>
> the exact dimensions of the last image.)<br>
<br>
If you are talking about an ImageJ 1.x style ImageStack data structure:<br>
this data structure can only contain images of identical X/Y dimension.<br>
There is simply no way to represent a collection of images with different<br>
dimensions as a single ImageStack.<br>
<br>
Ciao,<br>
Johannes<br>
</blockquote></div><br></div>