<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: R2009a &#8211; MATLAB updates</title>
	<atom:link href="http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/</link>
	<description>Steve Eddins manages the Image &#38; Geospatial development team at The MathWorks and coauthored Digital Image Processing Using MATLAB. He writes here about image processing concepts, algorithm implementations, and MATLAB.</description>
	<lastBuildDate>Wed, 01 Feb 2012 13:58:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Kuan</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-23247</link>
		<dc:creator>Kuan</dc:creator>
		<pubDate>Mon, 05 Jul 2010 19:15:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-23247</guid>
		<description>To Silas Leavesley:
  to write array data into ENVI format is very simple. But the lines and samples in ENVI are the samples and lines in Matlab. Just a transpose command will solve it.
  I have an m-file which might help you. It writes multi-spectral images. For reading ENVI files I have another function which is too long to post here.
  Enjoy.

Kuan

&lt;pre class=&quot;code&quot;&gt;
function write_envi_data(data,envifile,fname)
%%write data into envi format
%%Kuan June 15, 2006

fid=fopen(fname,&#039;wb&#039;);
if envifile.datatype==1
    readdatatype=&#039;uint8&#039;;
end
if envifile.datatype==2
    readdatatype=&#039;uint16&#039;;
end
if envifile.datatype==3
    readdatatype=&#039;int32&#039;;
end
if envifile.datatype==4
    readdatatype=&#039;single&#039;; %%This needs to be tested
end
if envifile.datatype==5
    readdatatype=&#039;double&#039;; %%This needs to be tested
end
if envifile.datatype==12
    readdatatype=&#039;uint16&#039;;
end
if envifile.datatype==13
    readdatatype=&#039;uint32&#039;;
end
if envifile.datatype==14
    readdatatype=&#039;int64&#039;;
end
if envifile.datatype==15
    readdatatype=&#039;uint64&#039;;
end
for i=1:size(data,3)
    newdata(:,:,i)=transpose(data(:,:,i));
end
clear data;
fwrite(fid,newdata,readdatatype);
fclose(fid);
fid=fopen(strcat(fname,&#039;.hdr&#039;),&#039;wb&#039;);
fprintf(fid,&#039;%s\n&#039;,&#039;ENVI&#039;);
fprintf(fid,&#039;%s&#039;,&#039;description = &#039;);
fprintf(fid,&#039;%s\n&#039;,123);
fprintf(fid,&#039;%s&#039;,&#039;Kuan Song file output from Matlab to ENVI&#039;);
fprintf(fid,&#039;%s\n&#039;,125);
fprintf(fid,&#039;%s %d\n&#039;,&#039;samples = &#039;,envifile.samples);
fprintf(fid,&#039;%s %d\n&#039;,&#039;lines = &#039;,envifile.lines);
fprintf(fid,&#039;%s %d\n&#039;,&#039;bands = &#039;,envifile.bands);
fprintf(fid,&#039;%s %d\n&#039;,&#039;data type = &#039;,envifile.datatype);
fprintf(fid,&#039;%s %d\n&#039;,&#039;header offset = &#039;,0);
fprintf(fid,&#039;%s \n&#039;,&#039;interleave = bsq&#039;);
fprintf(fid,&#039;%s \n&#039;,&#039;byte order = 0&#039;);
fprintf(fid,&#039;%s&#039;,&#039;file type = ENVI standard&#039;);

fclose(fid);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>To Silas Leavesley:<br />
  to write array data into ENVI format is very simple. But the lines and samples in ENVI are the samples and lines in Matlab. Just a transpose command will solve it.<br />
  I have an m-file which might help you. It writes multi-spectral images. For reading ENVI files I have another function which is too long to post here.<br />
  Enjoy.</p>
<p>Kuan</p>
<pre class="code">
function write_envi_data(data,envifile,fname)
%%write data into envi format
%%Kuan June 15, 2006

fid=fopen(fname,'wb');
if envifile.datatype==1
    readdatatype='uint8';
end
if envifile.datatype==2
    readdatatype='uint16';
end
if envifile.datatype==3
    readdatatype='int32';
end
if envifile.datatype==4
    readdatatype='single'; %%This needs to be tested
end
if envifile.datatype==5
    readdatatype='double'; %%This needs to be tested
end
if envifile.datatype==12
    readdatatype='uint16';
end
if envifile.datatype==13
    readdatatype='uint32';
end
if envifile.datatype==14
    readdatatype='int64';
end
if envifile.datatype==15
    readdatatype='uint64';
end
for i=1:size(data,3)
    newdata(:,:,i)=transpose(data(:,:,i));
end
clear data;
fwrite(fid,newdata,readdatatype);
fclose(fid);
fid=fopen(strcat(fname,'.hdr'),'wb');
fprintf(fid,'%s\n','ENVI');
fprintf(fid,'%s','description = ');
fprintf(fid,'%s\n',123);
fprintf(fid,'%s','Kuan Song file output from Matlab to ENVI');
fprintf(fid,'%s\n',125);
fprintf(fid,'%s %d\n','samples = ',envifile.samples);
fprintf(fid,'%s %d\n','lines = ',envifile.lines);
fprintf(fid,'%s %d\n','bands = ',envifile.bands);
fprintf(fid,'%s %d\n','data type = ',envifile.datatype);
fprintf(fid,'%s %d\n','header offset = ',0);
fprintf(fid,'%s \n','interleave = bsq');
fprintf(fid,'%s \n','byte order = 0');
fprintf(fid,'%s','file type = ENVI standard');

fclose(fid);
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Silas Leavesley</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-23171</link>
		<dc:creator>Silas Leavesley</dc:creator>
		<pubDate>Fri, 04 Jun 2010 02:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-23171</guid>
		<description>Hi Steve,

I&#039;m using MATLAB to process some multipage spectral image sets.  I want to import these into ENVI, but I can&#039;t seem to get the formatting correct (driving me nuts).  I&#039;m no expert at header formats, but I used AsTiffTagViewer to get info about the file.  There&#039;s a couple small differences (I can post header info if that would help).  Can we edit the contents of the header info from MATLAB?

Thanks!

-Silas</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>I&#8217;m using MATLAB to process some multipage spectral image sets.  I want to import these into ENVI, but I can&#8217;t seem to get the formatting correct (driving me nuts).  I&#8217;m no expert at header formats, but I used AsTiffTagViewer to get info about the file.  There&#8217;s a couple small differences (I can post header info if that would help).  Can we edit the contents of the header info from MATLAB?</p>
<p>Thanks!</p>
<p>-Silas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22290</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 04 Nov 2009 13:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22290</guid>
		<description>Grant&#8212;Sorry, but it won&#039;t be for R2010a. That development deadline has already passed.</description>
		<content:encoded><![CDATA[<p>Grant&mdash;Sorry, but it won&#8217;t be for R2010a. That development deadline has already passed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22279</link>
		<dc:creator>Grant</dc:creator>
		<pubDate>Tue, 03 Nov 2009 02:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22279</guid>
		<description>Oh no, I&#039;m definitely not feeling that ambitious, but I&#039;ll be keeping my otherwise busy fingers crossed for a fortuitous union of libtiff 4.0 RC and 2010a!</description>
		<content:encoded><![CDATA[<p>Oh no, I&#8217;m definitely not feeling that ambitious, but I&#8217;ll be keeping my otherwise busy fingers crossed for a fortuitous union of libtiff 4.0 RC and 2010a!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22278</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 03 Nov 2009 00:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22278</guid>
		<description>Grant&#8212;No, bigtiff is not supported.  You could try writing your own code against libtiff 4.0 if you&#039;re feeling ambitious.  This version of the library is still in beta test, which is why we haven&#039;t incorporated it into MATLAB yet.</description>
		<content:encoded><![CDATA[<p>Grant&mdash;No, bigtiff is not supported.  You could try writing your own code against libtiff 4.0 if you&#8217;re feeling ambitious.  This version of the library is still in beta test, which is why we haven&#8217;t incorporated it into MATLAB yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22277</link>
		<dc:creator>Grant</dc:creator>
		<pubDate>Tue, 03 Nov 2009 00:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-22277</guid>
		<description>I&#039;m still unclear, is there a way to support bigtiff in 2009b or not? 

Even if it&#039;s not officially supported, can I wrangle with libtiff (from Aperio or the bigtiff project) in some way?  

I&#039;d love to hear from anyone who&#039;s been successful with this</description>
		<content:encoded><![CDATA[<p>I&#8217;m still unclear, is there a way to support bigtiff in 2009b or not? </p>
<p>Even if it&#8217;s not officially supported, can I wrangle with libtiff (from Aperio or the bigtiff project) in some way?  </p>
<p>I&#8217;d love to hear from anyone who&#8217;s been successful with this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21958</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 09 Jul 2009 13:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21958</guid>
		<description>Siddharth&amp;Sorry about my confusion.</description>
		<content:encoded><![CDATA[<p>Siddharth&#038;Sorry about my confusion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siddharth</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21957</link>
		<dc:creator>Siddharth</dc:creator>
		<pubDate>Thu, 09 Jul 2009 13:43:10 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21957</guid>
		<description>This is once again the svs file I referred to earlier. (http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21577)

If you were asking about the release notes, I saw them when I used the Help-&gt;Check for updates menu option in MATLAB.</description>
		<content:encoded><![CDATA[<p>This is once again the svs file I referred to earlier. (<a href="http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21577" rel="nofollow">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21577</a>)</p>
<p>If you were asking about the release notes, I saw them when I used the Help-&gt;Check for updates menu option in MATLAB.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21954</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 08 Jul 2009 11:36:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21954</guid>
		<description>Richard&#8212;As far as I know, we don&#039;t maintain documentation for old versions online.  You should have it in your installation, though.  Or you could use the online version and check the release notes to see what has changed.</description>
		<content:encoded><![CDATA[<p>Richard&mdash;As far as I know, we don&#8217;t maintain documentation for old versions online.  You should have it in your installation, though.  Or you could use the online version and check the release notes to see what has changed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21953</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 08 Jul 2009 01:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/steve/2009/03/18/r2009a-matlab-updates/#comment-21953</guid>
		<description>Hi Steve,

where can i get a softcopy of the user&#039;s guide for the image processing toolbox 6.2? Last time i checked on the Mathworks site what they have was the user guide for version 6.3.

thanks</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>where can i get a softcopy of the user&#8217;s guide for the image processing toolbox 6.2? Last time i checked on the Mathworks site what they have was the user guide for version 6.3.</p>
<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

