<?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>Imaging and a little bit of OSS &#187; Imaging</title>
	<atom:link href="http://nuclear-imaging.info/site_content/tag/medimg/feed/" rel="self" type="application/rss+xml" />
	<link>http://nuclear-imaging.info/site_content</link>
	<description>Yet another techno blog</description>
	<lastBuildDate>Wed, 09 May 2012 13:02:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Converting .hdr/.img files to .nii</title>
		<link>http://nuclear-imaging.info/site_content/2010/03/08/converting-hdrimg-files-to-nii/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=converting-hdrimg-files-to-nii</link>
		<comments>http://nuclear-imaging.info/site_content/2010/03/08/converting-hdrimg-files-to-nii/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 20:10:28 +0000</pubDate>
		<dc:creator>slash_boot</dc:creator>
				<category><![CDATA[Imaging]]></category>
		<category><![CDATA[image processing]]></category>
		<category><![CDATA[mri]]></category>
		<category><![CDATA[segmentation]]></category>

		<guid isPermaLink="false">http://nuclear-imaging.info/site_content/?p=323</guid>
		<description><![CDATA[In order to convert files in .img and .hdr format to a single .nii file, we first need to install the nifti tools toolbox for matlab. nifti tools Once the path for nifti tools has been set in matlab, the files in .hdr and .img format can be combined to create a .nii file by <a href='http://nuclear-imaging.info/site_content/2010/03/08/converting-hdrimg-files-to-nii/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>In order to convert files in .img and .hdr format to a single .nii file, we first need to install the nifti tools toolbox for matlab.</p>
<p><a title="Download niftitools" href="http://www.rotman-baycrest.on.ca/~jimmy/NIFTI/" target="_blank">nifti tools</a></p>
<p>Once the path for nifti tools has been set in matlab, the files in .hdr and .img format can be combined to create a .nii file by running the following two commands:</p>
<blockquote><p>nii=load_nii(&#8216;filename_with_hdr_extension&#8217;);<br />
save_nii(nii, &#8216;desired_filename_for_niftifile.nii&#8217;);</p></blockquote>
<p>If you have freesurfer installed, you can convert between the files types with mri_convert by specifying the input (-it) and the output (-ot) type.</p>
<blockquote><p>mri_convert -i <em>name_of_input_file</em> -it <em>nifti1</em> -ot <em>nii</em> -o <em>name_of_output_file</em></p></blockquote>
<p>If you have functional dataset with several volumes over the course of your experiment, you can use the fslmerge function available in FSL to combine all the nifti files into a single 4D file.</p>
<blockquote><p>fslmerge -t output_name.nii *.nii</p></blockquote>
<p>Where *.nii would cover the entire set of nifti files if they are arranged sequentially.</p>
<p>Its not required to type in the extension .hdr or .img for the input image or output image if you have specified the input and the output types. By specifying the input type of nifti1, you tell the program that it will be a .hdr/.img pair, and specifying output type as nii goes for having your output with .nii extension.</p>
<p>To gzip the nifti file for use in freesurfer:</p>
<blockquote><p>gzip filename.nii filename1.nii.gz</p></blockquote>
<p>This will create a gzipped nifti file.</p>
<p>To automatically segment the structural volume:</p>
<blockquote><p>recon_all -i filename1.nii.gz -subjid SUBJID -all</p></blockquote>
<p>This will segment the structures containing in the structural file filename.nii.gz. Complete information on using recon-all for freesurfer can be found at <a title="FreeSurfer Wiki" href="https://surfer.nmr.mgh.harvard.edu/fswiki/recon-all" target="_blank">FreeSurfer Wiki</a>.</p>
<p>For some reason, Freesurfer seems to work well in tcsh. I&#8217;ve often encountered problems of weird nature when running it under bash. In order to run your autosegmentation with freesurfer type in tcsh at the terminal, since by default it is set to bash in most linux distros.</p>
]]></content:encoded>
			<wfw:commentRss>http://nuclear-imaging.info/site_content/2010/03/08/converting-hdrimg-files-to-nii/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Creating gif files from jpg, png, bmp, etc.</title>
		<link>http://nuclear-imaging.info/site_content/2009/03/03/creating-gif-files-from-jpg-png-bmp-etc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=creating-gif-files-from-jpg-png-bmp-etc</link>
		<comments>http://nuclear-imaging.info/site_content/2009/03/03/creating-gif-files-from-jpg-png-bmp-etc/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 01:41:58 +0000</pubDate>
		<dc:creator>slash_boot</dc:creator>
				<category><![CDATA[Imaging]]></category>
		<category><![CDATA[Linux and OSS]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[jaunty]]></category>

		<guid isPermaLink="false">http://nuclear-imaging.info/site_content/?p=180</guid>
		<description><![CDATA[I had to create a movie/animation out of a series of images that I had in my folder. There were several methods described on several forums which suggested using GIMP for creating GIF files from JPG or PNG files when one is using Linux. Now the problem was that I had 70 files in total <a href='http://nuclear-imaging.info/site_content/2009/03/03/creating-gif-files-from-jpg-png-bmp-etc/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I had to create a movie/animation out of a series of images that I had in my folder. There were several methods described on several forums which suggested using GIMP for creating GIF files from JPG or PNG files when one is using Linux. Now the problem was that I had 70 files in total and it would have taken me a long to time to add all those images to GIMP in order to create my animation file.</p>
<p>Then I read somewhere that we can actually create GIF images in command line mode using Imagemagick. But to do so you need to have Imagemagick installed on your system. To install it in Ubuntu, run:</p>
<pre>sudo apt-get install imagemagick</pre>
<p>This program has several features that would let you do all sorts of things with images. I was interested in converting a bunch of PNG files into an animated GIF file. To do so, we need to  rename the files in a way that they would lie in a sequence when arranged alphabetically (if you plan on doing it the easy way). Suppose you have files named <em>slide_01.png, slide_02.png, slide_02.png&#8230;.slide_xx.png</em>, and you want to convert them to <em>movie.gif</em>, we run:</p>
<pre>convert -delay 10 -loop 0 slide*.png movie.gif</pre>
<p>The parameter <em>delay</em> inserts a desired delay between two consecutive slides. The number <em>x</em> used for delay inserts <em>10x</em> milliseconds of delay between two frames. Loop parameter <em>0</em> makes it repeat infinitely.</p>
<p>If you had files with non-uniform names, then you need to input each of them in a sequence after the delay and loop parameters. Suppose you have file <em>summer.jpg, fall, winter.jpg, fall.jpg and spring.jpg</em> and you want to order them as fall, winter, spring and summer in the gif image <em>seasons.gif </em> with a 1 second delay between each of them, use:</p>
<pre>convert -delay 100 -loop 0 fall.jpg winter.jpg spring.jpg summer.jpg seasons.gif</pre>
<p>Here are some animations of numbers from 0 to 9 with varying delays.</p>
<p>The delay values specified the above cases were: 1, 5, 15, 25, 50 and 100.</p>
<div id="attachment_182" class="wp-caption alignleft" style="width: 170px"><img class="size-full wp-image-182" title="gif animation 10 millisecond delay" src="http://nuclear-imaging.info/site_content/wp-content/uploads/2009/03/anim_02.gif" alt="gif animation with 10 millisecond delay" width="160" height="120" /><p class="wp-caption-text">GIF animation with 10 millisecond frame delay</p></div>
<div id="attachment_181" class="wp-caption alignleft" style="width: 170px"><img class="size-full wp-image-181" title="gif animation 50 millisecond delay" src="http://nuclear-imaging.info/site_content/wp-content/uploads/2009/03/anim_01.gif" alt="gif animation with 50 millisecond delay" width="160" height="120" /><p class="wp-caption-text">GIF animation with 50 millisecond frame delay</p></div>
<div id="attachment_183" class="wp-caption alignleft" style="width: 170px"><img class="size-full wp-image-183" title="gif animation 150 millisecond delay" src="http://nuclear-imaging.info/site_content/wp-content/uploads/2009/03/anim_03.gif" alt="gif animation with 150 millisecond delay" width="160" height="120" /><p class="wp-caption-text">GIF animation with 150 millisecond  frame delay</p></div>
<div id="attachment_184" class="wp-caption alignleft" style="width: 170px"><img class="size-full wp-image-184" title="gif animation 250 millisecond delay" src="http://nuclear-imaging.info/site_content/wp-content/uploads/2009/03/anim_04.gif" alt="gif animation with 250 millisecond delay" width="160" height="120" /><p class="wp-caption-text">GIF animation with 250 millisecond frame delay</p></div>
<div id="attachment_185" class="wp-caption alignleft" style="width: 170px"><img class="size-full wp-image-185" title="gif animation 500 millisecond delay" src="http://nuclear-imaging.info/site_content/wp-content/uploads/2009/03/anim_05.gif" alt="gif animation with 500 millisecond delay" width="160" height="120" /><p class="wp-caption-text">GIF animation with 500 millisecond frame delay</p></div>
<div id="attachment_186" class="wp-caption alignleft" style="width: 170px"><img class="size-full wp-image-186" title="gif animation 1000 millisecond delay" src="http://nuclear-imaging.info/site_content/wp-content/uploads/2009/03/anim_06.gif" alt="gif animation 1 second delay" width="160" height="120" /><p class="wp-caption-text">GIF animation 1 second frame delay</p></div>
<p>=================</p>
]]></content:encoded>
			<wfw:commentRss>http://nuclear-imaging.info/site_content/2009/03/03/creating-gif-files-from-jpg-png-bmp-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photo iterations &#8230;or your preferred term</title>
		<link>http://nuclear-imaging.info/site_content/2009/02/18/photo-iterations-or-your-preferred-term/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=photo-iterations-or-your-preferred-term</link>
		<comments>http://nuclear-imaging.info/site_content/2009/02/18/photo-iterations-or-your-preferred-term/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 01:44:31 +0000</pubDate>
		<dc:creator>slash_boot</dc:creator>
				<category><![CDATA[Imaging]]></category>
		<category><![CDATA[philosophy]]></category>

		<guid isPermaLink="false">http://nuclear-imaging.info/site_content/?p=146</guid>
		<description><![CDATA[This evening I took a snapshot of my desk (which holds my desktop) with my cellphone camera. After transferring it via bluetooth, I opened the image and it was rather amusing to see the exact image of desk inside of an identical image. So just out of curiousity I snapped another photo with roughly the <a href='http://nuclear-imaging.info/site_content/2009/02/18/photo-iterations-or-your-preferred-term/' class='excerpt-more'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This evening I took a snapshot of my desk (which holds my desktop) with my cellphone camera. After transferring it via bluetooth, I opened the image and it was rather amusing to see the exact image of desk inside of an identical image. So just out of curiousity I snapped another photo with roughly the same FOV as before and loaded it on the computer, and again took a picture of that.</p>
<p style="text-align: center;">
<div id="attachment_147" class="wp-caption aligncenter" style="width: 563px"><img class="size-large wp-image-147" title="Photo within photo" src="http://nuclear-imaging.info/site_content/wp-content/uploads/2009/02/photo_iterations-1024x768.jpg" alt="Photo iterations: or photo within photo" width="553" height="415" /><p class="wp-caption-text">Photo iterations: or photo within photo</p></div>
<p style="text-align: center;">
<p>The picture looks quite interesting, as it depicts the same object at different time points within the same spatial space. I don&#8217;t see any artistic value in this picture, but what I do see is a lot of potential for philosophical discussion about time and space and how we can represent variations in time within a 2D space.</p>
]]></content:encoded>
			<wfw:commentRss>http://nuclear-imaging.info/site_content/2009/02/18/photo-iterations-or-your-preferred-term/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

