<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Reading Massively Multipage TIFFs: An Update</title>
	<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/</link>
	<description>Steve Eddins manages the Image &#38; Geospatial development team at &#60;a href="http://www.mathworks.com/"&#62;The MathWorks&#60;/a&#62; and coauthored &#60;a href="http://www.mathworks.com/support/books/book5291.html?category=-1&#38;language=-1"&#62;Digital Image Processing Using MATLAB&#60;/a&#62;. He writes here about image processing concepts, algorithm implementations, and MATLAB.&#60;br&#62;&#60;br&#62;&#60;img&#62;</description>
	<pubDate>Mon, 23 Nov 2009 00:05:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21146</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 10 Oct 2008 13:15:29 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21146</guid>
		<description>Vincent&#8212;OK, thanks for the information.</description>
		<content:encoded><![CDATA[<p>Vincent&mdash;OK, thanks for the information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21145</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Thu, 09 Oct 2008 21:48:07 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21145</guid>
		<description>My only data point on multithreading is that the Performance tab of the Task Manager shows increased CPU usage on multiple core in ImageJ but not in MATLAB.</description>
		<content:encoded><![CDATA[<p>My only data point on multithreading is that the Performance tab of the Task Manager shows increased CPU usage on multiple core in ImageJ but not in MATLAB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21144</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 09 Oct 2008 20:29:29 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21144</guid>
		<description>Vincent&#8212;Thanks for giving it a try and reporting back.  I'm a bit skeptical that multithreading would explain the performance difference, since I/O-bound ops aren't likely to benefit from multiple threads.  One issue we have to deal with in MATLAB is that array elements are stored in a different order than the way they are stored in every image file format, including TIFF.  This results in cache misses that slow things down.  An import operation in ImageJ alone wouldn't have this problem.</description>
		<content:encoded><![CDATA[<p>Vincent&mdash;Thanks for giving it a try and reporting back.  I&#8217;m a bit skeptical that multithreading would explain the performance difference, since I/O-bound ops aren&#8217;t likely to benefit from multiple threads.  One issue we have to deal with in MATLAB is that array elements are stored in a different order than the way they are stored in every image file format, including TIFF.  This results in cache misses that slow things down.  An import operation in ImageJ alone wouldn&#8217;t have this problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21143</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Thu, 09 Oct 2008 18:19:59 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21143</guid>
		<description>Oops numbers were wrong. Data set was 450MB large so the numbers are:

Results: ImageJ alone =&#60; 5 s (or 90 MB/s).

ImageJ within MATLAB = 8.8s (or 50 MB/s).

New imread (see code below) = 11.3s (or 40 MB/s).</description>
		<content:encoded><![CDATA[<p>Oops numbers were wrong. Data set was 450MB large so the numbers are:</p>
<p>Results: ImageJ alone =&lt; 5 s (or 90 MB/s).</p>
<p>ImageJ within MATLAB = 8.8s (or 50 MB/s).</p>
<p>New imread (see code below) = 11.3s (or 40 MB/s).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21142</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Thu, 09 Oct 2008 18:00:02 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21142</guid>
		<description>Steve- I just had a quick run at the new imread.m patch. It's much faster than the previous version but not quite as fast as our current solution. We currently solution is to read the tiff stack using the ImageJ java library, and cast the result to a MATLAB array (which is itself very inefficient). Here are the results of my informal benchmark. 

Hardware: 2x Quad Core Xeon 2.3 GHz, 32 GB RAM
Software: Windows 2003 Server x64, R2008a, ImageJ 1.38x
Benchmark: Reading a 900 MB TIFF stack split in four files, 3840 slices total each with 239x256 resolution. All reads done from the cache so the benchmark does not depend on hard disk bandwidth. 

Results: ImageJ alone =&#60; 5 s (or 180 MB/s). 

ImageJ within MATLAB = 8.8s (or 100MB/s). 

New imread (see code below) = 11.3s (or 80 MB/s). 

I think that the difference in performance can explained by differences in multithreading support. imread is essentially singlethreaded and ImageJ has native multithreading support.

Note that this is a toy data set. Our typical data sets are much larger. 

Here is the code:

    info = imfinfo(filename);

    stack = zeros(info(1).Height,info(1).Width,1000,'uint16');

    for k = 1:length(info)
        stack(:,:,k) = imread(ffilename , 'Index', k, 'Info', info);
    end</description>
		<content:encoded><![CDATA[<p>Steve- I just had a quick run at the new imread.m patch. It&#8217;s much faster than the previous version but not quite as fast as our current solution. We currently solution is to read the tiff stack using the ImageJ java library, and cast the result to a MATLAB array (which is itself very inefficient). Here are the results of my informal benchmark. </p>
<p>Hardware: 2x Quad Core Xeon 2.3 GHz, 32 GB RAM<br />
Software: Windows 2003 Server x64, R2008a, ImageJ 1.38x<br />
Benchmark: Reading a 900 MB TIFF stack split in four files, 3840 slices total each with 239&#215;256 resolution. All reads done from the cache so the benchmark does not depend on hard disk bandwidth. </p>
<p>Results: ImageJ alone =&lt; 5 s (or 180 MB/s). </p>
<p>ImageJ within MATLAB = 8.8s (or 100MB/s). </p>
<p>New imread (see code below) = 11.3s (or 80 MB/s). </p>
<p>I think that the difference in performance can explained by differences in multithreading support. imread is essentially singlethreaded and ImageJ has native multithreading support.</p>
<p>Note that this is a toy data set. Our typical data sets are much larger. </p>
<p>Here is the code:</p>
<p>    info = imfinfo(filename);</p>
<p>    stack = zeros(info(1).Height,info(1).Width,1000,&#8217;uint16&#8242;);</p>
<p>    for k = 1:length(info)<br />
        stack(:,:,k) = imread(ffilename , &#8216;Index&#8217;, k, &#8216;Info&#8217;, info);<br />
    end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddharth</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21052</link>
		<dc:creator>Siddharth</dc:creator>
		<pubDate>Wed, 10 Sep 2008 15:33:19 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21052</guid>
		<description>Great ! I am looking forward to the new functionality.</description>
		<content:encoded><![CDATA[<p>Great ! I am looking forward to the new functionality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21046</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 09 Sep 2008 13:06:58 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21046</guid>
		<description>Siddharth&#8212;Thanks for the suggestion.  We are currently looking at a variety of workflows involving large TIFFs.</description>
		<content:encoded><![CDATA[<p>Siddharth&mdash;Thanks for the suggestion.  We are currently looking at a variety of workflows involving large TIFFs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddharth Samsi</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21042</link>
		<dc:creator>Siddharth Samsi</dc:creator>
		<pubDate>Mon, 08 Sep 2008 14:57:59 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21042</guid>
		<description>This is a little off topic, but it relates to large TIFFs: 
I was pleasantly surprised with the new functionality in the imshow function in MATLAB R2008a, namely, the ability to auto-reduce/resize and display large TIFFs. (I have tried this with success on a 500 MB TIFF image on a 32-bit machine with only 1.5 GB RAM)
Are there any plans to incorporate this type of functionality for TIFF files into the imresize function ? While the imread function along with the 'PixelRegion' parameter can be used to resize the TIFF and create thumbnails for future use, it would be convenient to simply use the imresize function.</description>
		<content:encoded><![CDATA[<p>This is a little off topic, but it relates to large TIFFs:<br />
I was pleasantly surprised with the new functionality in the imshow function in MATLAB R2008a, namely, the ability to auto-reduce/resize and display large TIFFs. (I have tried this with success on a 500 MB TIFF image on a 32-bit machine with only 1.5 GB RAM)<br />
Are there any plans to incorporate this type of functionality for TIFF files into the imresize function ? While the imread function along with the &#8216;PixelRegion&#8217; parameter can be used to resize the TIFF and create thumbnails for future use, it would be convenient to simply use the imresize function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21001</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 23 Aug 2008 17:00:58 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-21001</guid>
		<description>Wagas&#8212;It depends on how much memory you have on your computer.  You should be able to load a 94 MB TIFF file into MATLAB on a modern computer, unless perhaps the file is highly compressed.</description>
		<content:encoded><![CDATA[<p>Wagas&mdash;It depends on how much memory you have on your computer.  You should be able to load a 94 MB TIFF file into MATLAB on a modern computer, unless perhaps the file is highly compressed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-20986</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 21 Aug 2008 15:07:34 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2008/07/30/tiff-update/#comment-20986</guid>
		<description>Giles&#8212;I do not see a previous query from you on this post.  It's possible I may have deleted your comment; it is my policy to delete comments that are not relevant to the posted topic.  Also, I make no promises about when I will reply to relevant comments.  Often I answer simple questions immediately, but sometimes it takes a week or so for me to catch up on comments.  If you are looking for a reliably quick response, you are better off contacting technical support.

Your image size is quite large, and if you are running on a 32-bit OS you will likely run out of virtual address space (an OS limitation), even if you do have enough RAM.

See this &lt;a href="http://www.mathworks.com/support/tech-notes/1100/1107.html" rel="nofollow"&gt;product support note&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Giles&mdash;I do not see a previous query from you on this post.  It&#8217;s possible I may have deleted your comment; it is my policy to delete comments that are not relevant to the posted topic.  Also, I make no promises about when I will reply to relevant comments.  Often I answer simple questions immediately, but sometimes it takes a week or so for me to catch up on comments.  If you are looking for a reliably quick response, you are better off contacting technical support.</p>
<p>Your image size is quite large, and if you are running on a 32-bit OS you will likely run out of virtual address space (an OS limitation), even if you do have enough RAM.</p>
<p>See this <a href="http://www.mathworks.com/support/tech-notes/1100/1107.html" rel="nofollow">product support note</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
