<div dir="ltr">Hello Sebastien,<div><br></div><div>now I just use the command </div><div>"reader = bfGetReader('C:\000_whole_slides\tissue40x-8B.ndpi'); </div><div>plane = reader.openThumbBytes(1);" <br></div><div>to get the thumbnail. But the output is a vector. 12288 x1. in the bfGetPlane function, you use the reshape function to transfer it to 2-D image. But in that function we know the size of image. And now I don't know the size (width and height). Do you know how to transfer it to image? Thank you.</div><div><br></div><div>Sincerely,</div><div>Qi</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 8, 2015 at 5:45 AM, Sebastien Besson (Staff) <span dir="ltr"><<a href="mailto:s.besson@dundee.ac.uk" target="_blank">s.besson@dundee.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
Hi Qi,
<div><br>
</div>
<div>all understood and this certainly makes sense.</div>
<div>The Bio-Formats API has a method to return bytes corresponding to a thumbnail instead of a full plane, see</div>
<div><a href="http://downloads.openmicroscopy.org/bio-formats/5.1.0/api/loci/formats/FormatReader.html#openThumbBytes(int)" target="_blank">http://downloads.openmicroscopy.org/bio-formats/5.1.0/api/loci/formats/FormatReader.html#openThumbBytes(int)</a></div>
<div><br>
</div>
<div>This method can be used in the same way that bfGetPlane() makes use openBytes() to retrieve a single</div>
<div>plane. Here, the final array would have to be resized by the thumbnail size, typically 128 x 128, instead</div>
<div>of the full plane dimensions</div>
<div><br>
</div>
<div>Note however that the way to get thumbnails for almost all of the readers is to read the pixels data</div>
<div>and scale it internally. For very large WSI, calling this method will likely be restricted to the same memory</div>
<div>limitations as reading full planes.</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Sebastien</div><div><div class="h5">
<div><br>
<div>
<blockquote type="cite">
<div>On 7 Apr 2015, at 15:53, Qi Gong <<a href="mailto:qigong@gwmail.gwu.edu" target="_blank">qigong@gwmail.gwu.edu</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>
<div>
<div>Hello Sebastien,<br>
<br>
</div>
Thank you for your email. I am sorry, my description was not clear. It is not "1-by-1". Now I could extract some sub_area of image, but the extracted image is
<b>1-to-1 </b>pixel with WSI. What we want is a thumbnail. In other word, we want to display the whole WSI or a large part of WSI in a small size. Thank you.<br>
<br>
</div>
Sincerely,<br>
</div>
Qi<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Apr 6, 2015 at 6:37 PM, Sebastien Besson (Staff)
<span dir="ltr"><<a href="mailto:s.besson@dundee.ac.uk" target="_blank">s.besson@dundee.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Qi,
<div><br>
</div>
<div><br>
</div>
<div>Do you need a thumbnail</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>
<blockquote type="cite">
<div>On 6 Apr 2015, at 22:11, Qi Gong <<a href="mailto:qigong@gwmail.gwu.edu" target="_blank">qigong@gwmail.gwu.edu</a>> wrote:</div>
<br>
<div>
<div dir="ltr">Hello Sebastien,</div>
</div>
</blockquote>
<div><br>
</div>
Hi Qi,<span><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div>Thank you your your reply. I think it is working.</div>
</div>
</blockquote>
<div><br>
</div>
</span>Good to hear.</div>
<div><span><br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>Now, I want to use BIO to get a WSI ( whole slide image) image. But as the WSI is to large more than 2 GB. I can't use bfopen to open it. Melissa told me a could use bfGetPlane to get the image.
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>Indeed, if the image is large enough, reading all the planes into memory like boffin does simply does not</div>
<div>scale and you have to read selectively.</div>
<span>
<div><br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>But it extract image is 1-by-1 pixel. </div>
</div>
</div>
</blockquote>
<div><br>
</div>
</span>
<div>If you have a WSI, it is surprising that the command pasted in a previous thread would return a single pixel</div>
<div>Can you give us the full dimensions of your image as given by</div>
<div>>> r = bfGetReader(‘\path\to\file);</div>
<div>>> r.getSizeX()</div>
<div>>> r.getSizeY()</div>
<div>
<div>>> r.getSizeZ()</div>
<div>>> r.getSizeC()</div>
</div>
<div>>> r.getSizeT()</div>
<div>Also, can you paste the command you use to retrieve this 1-by-1 pixel array?</div>
<span>
<div><br>
</div>
<div>
<blockquote type="cite">
<div dir="ltr">
<div>But some time, we need and thumb image of whole image. Do you know how to extract a 1-by-N image? That means, Extract the whole image (with size 10000x10000), but only display and save in 100x100 size. Thank you.</div>
</div>
</blockquote>
</div>
<div><br>
</div>
</span>
<div>Just to be sure, do you want to read a thumbnail for the entire image? Or are you looking for a way to</div>
<div>retrieve a tile i.e. a XY subset of the full image?</div>
<div><br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>Sincerely,</div>
<div>Qi </div>
</div>
</div>
</blockquote>
<div><br>
</div>
Best regards,</div>
<div>Sebastien</div>
<div>
<div>
<div><br>
<blockquote type="cite">
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Apr 6, 2015 at 3:26 PM, Sebastien Besson <span dir="ltr">
<<a href="mailto:seb.besson@gmail.com" target="_blank">seb.besson@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Qi,
<div><br>
</div>
<div>the content of your java.opts looks valid (although you might want to increase the</div>
<div>memory settings later). According to the MATLAB documentation, e.g.</div>
<div><a href="http://uk.mathworks.com/help/matlab/matlab_env/java-opts-file.html?refresh=true" target="_blank">http://uk.mathworks.com/help/matlab/matlab_env/java-opts-file.html?refresh=true</a></div>
<div>you need to put this file either in the MATLAB startup folder or under the `bin\arch` folder</div>
<div>under the MATLAB root path. Locally, I have a `java.opts` under `~/Documents/MATLAB` for</div>
<div>instance.</div>
<div><br>
</div>
<div>Can you try either of these options and check the output of the following command</div>
<div>>> java.lang.Runtime.getRuntime().maxMemory</div>
<div>reflects what it in your java.opts</div>
<div><br>
</div>
<div><br>
</div>
<div>Sebastien</div>
<div><br>
<div>
<blockquote type="cite">
<div>
<div>
<div>On 6 Apr 2015, at 19:53, Qi Gong <<a href="mailto:qigong@gwmail.gwu.edu" target="_blank">qigong@gwmail.gwu.edu</a>> wrote:</div>
<br>
</div>
</div>
<div>
<div>
<div>
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">Hello everyone,
<div><br>
</div>
<div>Sorry for bother. I try to use <span style="font-size:12.8000001907349px"> </span><span style="font-size:12.8000001907349px">Matlab version of Bio-Formats. But I face the memory problem, I know, we could add a time named java.opts
to solve the problem. </span></div>
<div><br>
</div>
<div>I put the file the java.opts into matlab folder as attachment. But matlab still shows the warning. Could anyone help me check whether my java.opts is correct or not? Thank you.</div>
<div><br>
</div>
<div>Sincerely,</div>
<div>Qi</div>
</div>
<div class="gmail_extra">
<div><br>
<div class="gmail_quote"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<span><matlab folder.png></span><span><memory warning.png></span><span><java.opts></span>_______________________________________________<span><br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
</span></div>
</blockquote>
</div>
<br>
</div>
</div>
<br>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>mobile phone: <a href="tel:2024060862" value="+12024060862" target="_blank">
2024060862</a></div>
</div>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</div>
<br>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div>mobile phone: <a href="tel:2024060862" value="+12024060862" target="_blank">2024060862</a></div>
</div>
_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<span style="font-size:10pt">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</div></div></div>
<br>_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">mobile phone: 2024060862</div>
</div>