<?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: MATLAB R2009a - imread and multipage TIFFs</title>
	<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/</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:24:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22060</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 17 Aug 2009 17:43:42 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22060</guid>
		<description>Vijay&#8212;Patience.  R2009b is scheduled to ship next month.  After it is released I will be happy to discuss what's in it.</description>
		<content:encoded><![CDATA[<p>Vijay&mdash;Patience.  R2009b is scheduled to ship next month.  After it is released I will be happy to discuss what&#8217;s in it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22059</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Mon, 17 Aug 2009 17:43:01 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22059</guid>
		<description>Gerard&#8212;I get a two-image TIFF file when I run your code.  How do you know your file contains only one image?  What's the output of this code:

&lt;pre&gt;
num_images = numel(imfinfo('16bit.tif'))
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Gerard&mdash;I get a two-image TIFF file when I run your code.  How do you know your file contains only one image?  What&#8217;s the output of this code:</p>
<pre>
num_images = numel(imfinfo('16bit.tif'))
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay Iyer</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22048</link>
		<dc:creator>Vijay Iyer</dc:creator>
		<pubDate>Mon, 17 Aug 2009 12:28:50 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22048</guid>
		<description>Can you give us an overview of what the LibTIFF library wrapper that's included in 2009b will get us? This seems like it could be the most powerful way to work with large multi-page TIFF files, streamed reads/writes, etc.</description>
		<content:encoded><![CDATA[<p>Can you give us an overview of what the LibTIFF library wrapper that&#8217;s included in 2009b will get us? This seems like it could be the most powerful way to work with large multi-page TIFF files, streamed reads/writes, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerard</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22042</link>
		<dc:creator>Gerard</dc:creator>
		<pubDate>Tue, 11 Aug 2009 17:56:48 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-22042</guid>
		<description>&lt;pre&gt;
pointlist1=linspace(0, 16383, 480);  %% make float data for one line
pointlist2=linspace(16383, 0, 480);  %% make float data for one line
A=repmat(pointlist1,640,1);    %% construct float 640x480 array 
B=repmat(pointlist2,640,1);    %% construct float 640x480 array 
a=uint16(A);
b=uint16(B);
imwrite(a,'16bit.tif','WriteMode','Append');
imwrite(b,'16bit.tif','WriteMode','Append');
&lt;/pre&gt;
Hi Steve, my question is on making multipage tif files, can this be done in matlab?  I have csv files that I want to wrap together into a multipage tif.  My first test was using  imwrite and trying to append 2 different matrices, I seem to only get the first one, it is at least 16 bit but only one file.  Anyone have any suggestions?</description>
		<content:encoded><![CDATA[<pre>
pointlist1=linspace(0, 16383, 480);  %% make float data for one line
pointlist2=linspace(16383, 0, 480);  %% make float data for one line
A=repmat(pointlist1,640,1);    %% construct float 640x480 array
B=repmat(pointlist2,640,1);    %% construct float 640x480 array
a=uint16(A);
b=uint16(B);
imwrite(a,'16bit.tif','WriteMode','Append');
imwrite(b,'16bit.tif','WriteMode','Append');
</pre>
<p>Hi Steve, my question is on making multipage tif files, can this be done in matlab?  I have csv files that I want to wrap together into a multipage tif.  My first test was using  imwrite and trying to append 2 different matrices, I seem to only get the first one, it is at least 16 bit but only one file.  Anyone have any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21975</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 15 Jul 2009 13:16:13 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21975</guid>
		<description>Grant&#8212;Your suggestions are reasonable and other people have made them as well.  I see at least two interface design problems, though.  First, what would you like imwrite to do in the case where num_images equals 3?  If you pass an M-by-N-by-3 array to imwrite today, it writes a single-frame RGB image.  How can imwrite distinguish between between a single-frame RGB image and 3 image frames?

Second, what should imread do for TIFF files that contain images of different size, bit depths, color formats, etc.?  You can't stack such images into a single multidimensional MATLAB array.  You could return a cell array, but that would lose the convenience you're looking for, and it would introduce an awkward syntactic discontinuity for the case where num_images equals 1.

I'm sure that all of these functional behavior issues could be solved.  However, because the for-loop is very straightfoward to write, and because of the many other TIFF-related enhancement requests, we are unlikely to implement something like you suggest in the near future.</description>
		<content:encoded><![CDATA[<p>Grant&mdash;Your suggestions are reasonable and other people have made them as well.  I see at least two interface design problems, though.  First, what would you like imwrite to do in the case where num_images equals 3?  If you pass an M-by-N-by-3 array to imwrite today, it writes a single-frame RGB image.  How can imwrite distinguish between between a single-frame RGB image and 3 image frames?</p>
<p>Second, what should imread do for TIFF files that contain images of different size, bit depths, color formats, etc.?  You can&#8217;t stack such images into a single multidimensional MATLAB array.  You could return a cell array, but that would lose the convenience you&#8217;re looking for, and it would introduce an awkward syntactic discontinuity for the case where num_images equals 1.</p>
<p>I&#8217;m sure that all of these functional behavior issues could be solved.  However, because the for-loop is very straightfoward to write, and because of the many other TIFF-related enhancement requests, we are unlikely to implement something like you suggest in the near future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21972</link>
		<dc:creator>Grant</dc:creator>
		<pubDate>Mon, 13 Jul 2009 18:54:55 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21972</guid>
		<description>sorry, that first imwrite statement should look like

&lt;pre&gt;

imwrite (A(:,:,:),outfile.tif)

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>sorry, that first imwrite statement should look like</p>
<pre>

imwrite (A(:,:,:),outfile.tif)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21971</link>
		<dc:creator>Grant</dc:creator>
		<pubDate>Mon, 13 Jul 2009 18:52:34 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21971</guid>
		<description>It would be great if there was an option to load up a variable and write it at once instead of iteratively... at the moment imwrite will not handle this, for example, this imwrite statement will fail when it is a perfectly legitimate request:

&lt;pre&gt;

for k = 1:num_images
    A(:,:,k) = imread(fname, k, 'Info', info);
end

imwrite (A(:,:,k),outfile.tif)

&lt;/pre&gt;

On that note, it would be great imread could read all frames at once. If I want to do a simple operation on all frames, I have to run it through a loop and iteratively operate.  But it would be great if imread assumed ALL frames, rather than the first, where this code would read, flip, and write all frames:

&lt;pre&gt;

A=imread('tifname');
A=flipupd(A);
imwrite(A,outfile);

&lt;/pre&gt;

or at least make a way to address all frames e.g.

&lt;pre&gt;

A(:,:,:)=imread('tifname',:)

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>It would be great if there was an option to load up a variable and write it at once instead of iteratively&#8230; at the moment imwrite will not handle this, for example, this imwrite statement will fail when it is a perfectly legitimate request:</p>
<pre>

for k = 1:num_images
    A(:,:,k) = imread(fname, k, 'Info', info);
end

imwrite (A(:,:,k),outfile.tif)
</pre>
<p>On that note, it would be great imread could read all frames at once. If I want to do a simple operation on all frames, I have to run it through a loop and iteratively operate.  But it would be great if imread assumed ALL frames, rather than the first, where this code would read, flip, and write all frames:</p>
<pre>

A=imread('tifname');
A=flipupd(A);
imwrite(A,outfile);
</pre>
<p>or at least make a way to address all frames e.g.</p>
<pre>

A(:,:,:)=imread('tifname',:)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21891</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 18 Jun 2009 11:59:23 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21891</guid>
		<description>Mike&#8212;I generally avoid commenting on specific schedules for software changes.</description>
		<content:encoded><![CDATA[<p>Mike&mdash;I generally avoid commenting on specific schedules for software changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21888</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 18 Jun 2009 04:40:57 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21888</guid>
		<description>Steve,

Will Matlab2009b have the function of saving floating-point TIFF? How about GEOTIFF?

Mike</description>
		<content:encoded><![CDATA[<p>Steve,</p>
<p>Will Matlab2009b have the function of saving floating-point TIFF? How about GEOTIFF?</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21821</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 02 Jun 2009 15:20:38 +0000</pubDate>
		<guid>http://blogs.mathworks.com/steve/2009/04/02/matlab-r2009a-imread-and-multipage-tiffs/#comment-21821</guid>
		<description>Joshuav&#8212;Thanks for the comment. We are working on ways to speed up writing stacks to TIFF files.  It probably won't look exactly the same as what we've already done with &lt;tt&gt;imread&lt;/tt&gt;.</description>
		<content:encoded><![CDATA[<p>Joshuav&mdash;Thanks for the comment. We are working on ways to speed up writing stacks to TIFF files.  It probably won&#8217;t look exactly the same as what we&#8217;ve already done with <tt>imread</tt>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
