<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Party to the World &#187; vtk</title>
	<atom:link href="http://dan.lecocq.us/wordpress/tag/vtk/feed/" rel="self" type="application/rss+xml" />
	<link>http://dan.lecocq.us/wordpress</link>
	<description>Life, love, and computer science</description>
	<lastBuildDate>Fri, 06 Jan 2012 17:21:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>VTK and Volume Visualization</title>
		<link>http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/</link>
		<comments>http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 18:40:25 +0000</pubDate>
		<dc:creator>dan.lecocq</dc:creator>
				<category><![CDATA[computer science]]></category>
		<category><![CDATA[school]]></category>
		<category><![CDATA[chest]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[CT]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[pvm]]></category>
		<category><![CDATA[raw]]></category>
		<category><![CDATA[visualization]]></category>
		<category><![CDATA[volume]]></category>
		<category><![CDATA[vtk]]></category>

		<guid isPermaLink="false">http://dan.lecocq.us/wordpress/?p=705</guid>
		<description><![CDATA[This week for Scientific Visualization, we&#8217;re talking about volume rendering and using VTK to explore some data. I got some datasets from The Volume Library and after a little tinkering, got VTK to render them. (And now a quick aside on how to do this as I didn&#8217;t find much information on the subject). I [...]]]></description>
			<content:encoded><![CDATA[<p>This week for Scientific Visualization, we&#8217;re talking about volume rendering and using VTK to explore some data.  I got some datasets from <a href="http://www9.informatik.uni-erlangen.de/External/vollib/">The Volume Library</a> and after a little tinkering, got VTK to render them. (And now a quick aside on how to do this as I didn&#8217;t find much information on the subject).</p>
<p>I used a tool (pvm2raw) available as part of the <a href="http://www.stereofx.org/volume.html">V^3</a> library to convert the pvm files to raw, but VTK requires its own simple <a href="http://www.eichberger.de/2005/10/how-to-convert-raw-file-to-vtk.html">header</a>.  I actually found that this particular header didn&#8217;t work (perhaps a VTK versioning problem?) and so taking guidance from this, checked the header of one of the VTK-included volumes:<br />
<code><br />
bash $> head VTKData/ironProt.vk<br />
</code></p>
<p>This header more or less included a little information on the grid size, spacing and representation of the data:<br />
<code><br />
# vtk DataFile Version 1.0<br />
&lt;Name of File&gt;</p>
<p>BINARY</p>
<p>DATASET STRUCTURED_POINTS</p>
<p>DIMENSIONS &lt;x&gt; &lt;y&gt; &lt;z&gt;<br />
ASPECT_RATIO 1 &lt;y/x&gt; &lt;z/x&gt;<br />
ORIGIN 0 0 0</p>
<p>POINT_DATA &lt;x * y * z&gt;<br />
SCALARS scalars &lt;unsigned_char|unsigned_short&gt;<br />
LOOKUP_TABLE default<br />
&lt;remember to include a newline here&gt;<br />
</code></p>
<p>Concatenating the header with the raw:<br />
<code><br />
bash $> cat header CT-Head.raw > CT-Head.vtk<br />
</code></p>
<p>At that point, I was in business and was able to move on to generating pretty pictures.  Granted, these datasets are pretty sparse, but still VTK did a pretty reasonable job.  <strong>Update:</strong> a comment asked for a little bit more detail on this assignment, and so I&#8217;m including <a href='http://dan.lecocq.us/wordpress/wp-content/uploads/2009/11/report.pdf'>my report</a> for the project.</p>

<a href='http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/bruce/' title='Bruce'><img width="150" height="150" src="http://dan.lecocq.us/wordpress/wp-content/uploads/2009/11/Bruce-150x150.png" class="attachment-thumbnail" alt="Bruce Gooch&#039;s Head" title="Bruce" /></a>
<a href='http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/chest/' title='chest'><img width="150" height="150" src="http://dan.lecocq.us/wordpress/wp-content/uploads/2009/11/chest-150x150.png" class="attachment-thumbnail" alt="A CT-scan of a human chest" title="chest" /></a>
<a href='http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/chest2/' title='chest2'><img width="150" height="150" src="http://dan.lecocq.us/wordpress/wp-content/uploads/2009/11/chest2-150x150.png" class="attachment-thumbnail" alt="The same chest, from a different direction" title="chest2" /></a>
<a href='http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/engine/' title='engine'><img width="150" height="150" src="http://dan.lecocq.us/wordpress/wp-content/uploads/2009/11/engine-150x150.png" class="attachment-thumbnail" alt="An engine of some type" title="engine" /></a>
<a href='http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/foot/' title='foot'><img width="150" height="150" src="http://dan.lecocq.us/wordpress/wp-content/uploads/2009/11/foot-150x150.png" class="attachment-thumbnail" alt="A foot. &#039;Nuff said." title="foot" /></a>
<a href='http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/orange/' title='orange'><img width="150" height="150" src="http://dan.lecocq.us/wordpress/wp-content/uploads/2009/11/orange-150x150.png" class="attachment-thumbnail" alt="A delicious orange" title="orange" /></a>

<p>I was amazed today that we can see inside of things&#8230; without taking them apart.  What an age to live in.  Especially the <a href="http://www.visualiseringscenter.se/1/1.0.1.0/230/1/">virtual autopsy table</a> I read about recently.  In 20 years, we&#8217;ll have Firefly-style real-time holographic body scans (ignore music, skip to 0:45):</p>
<p><object width="480" height="385" class="aligncenter"><param name="movie" value="http://www.youtube.com/v/Kgq_Psl9N6Q&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Kgq_Psl9N6Q&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://dan.lecocq.us/wordpress/2009/11/09/vtk-and-volume-visualization/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

