<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Dear Andreja,
<div class=""><br class="">
</div>
<div class="">I have never understood ft_volumelookup myself, so I wonder whether you would be helped by proposing a different strategy…</div>
<div class=""><br class="">
</div>
<div class="">I would do the following:</div>
<div class=""><br class="">
</div>
<div class="">% read in the atlas</div>
<div class="">atlas = ft_read_atlas(‘somefilename’);</div>
<div class=""><br class="">
</div>
<div class="">% read in and normalise the anatomical image</div>
<div class="">mri = ft_read_mri(‘someotherfilename’)</div>
<div class="">mri = ft_volumenormalise([], mri);</div>
<div class=""><br class="">
</div>
<div class="">% assuming that both atlas and mri are in the same coordinate system</div>
<div class="">cfg = [];</div>
<div class="">cfg.parameter = ‘tissue’;</div>
<div class="">mri2 = ft_sourceinterpolate(cfg, atlas, mri);</div>
<div class=""><br class="">
</div>
<div class="">The last step gives you the atlas interpolated onto the anatomical MRI. </div>
<div class=""><br class="">
</div>
<div class="">It should be straightforward to create a boolean mask from here that specifies a particular ROI</div>
<div class=""><br class="">
</div>
<div class="">mri2.mask = mri2.tissue==strcmp(atlas.tissuelabel, ‘yourfavoritebrodmannarea’);</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I hope this helps.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 06 Jul 2016, at 15:33, Andreja Kostić <<a href="mailto:andrejakosticln@gmail.com" class="">andrejakosticln@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">Hello dear Fieldtrippers!</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">This is my first post on the mailing list, so I apologize if this looks a bit confused.
</span></p>
<div style="margin-bottom: 0.0001pt; line-height: normal;" class=""><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class=""> </span><br class="webkit-block-placeholder">
</div>
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">So I'm trying to use the WFU PickAtlas for Brodmann areas in what I think are MNI coordinates to find
 specific regions inside of a brain (I'm coming from electrical engineering background, so I can't do that "by hand") in an individual whole-head MRI and I'm having issues getting sane results.<br class="">
<br class="">
I suspect that my workflow is the problem, so I would be very grateful if someone could provide some advice as to what I should be actually doing.
<br class="">
<br class="">
My original idea was to take MRI in CTF coordinates, convert it to MNI coordinates and then just use atlas to make masks. From what I could gather, it's not that simple.
</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">So here are examples of what I'm doing right now:<br class="">
<br class="">
ft_defaults;</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">%Let's read atlas</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">atlas = ft_read_atlas('C:\REALY_LONG_PATH_TO_PICKATLAS\wfu_pickatlas\MNI_atlas_templates\TD_brodmann.nii');<br class="">
<br class="">
<br class="">
%Using Subject01from FT tutorials right now, for simplicity's sake.<br class="">
mri = ft_read_mri('Subject01\Subject01.mri');<br class="">
<br class="">
<br class="">
%Reslice, apply transformations<br class="">
cfg=[];<br class="">
cfg.dim=[256 256 256];<br class="">
mri_resliced=ft_volumereslice(cfg, mri);<br class="">
<br class="">
cfg=[];<br class="">
mri_norm1=ft_volumenormalise(cfg,mri_resliced);</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">%Unfortunately, this cuts off everything below the nose!</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">%Still let's take a look at the visualization with atlas<br class="">
<br class="">
cfg=[];<br class="">
cfg.inputcoord='mni';<br class="">
cfg.atlas=atlas;<br class="">
cfg.roi='brodmann area 4';<br class="">
<br class="">
mask4 = ft_volumelookup(cfg, mri_norm1);<br class="">
mri_norm1.mask4=mask4;<br class="">
<br class="">
cfg=[];<br class="">
cfg.atlas=atlas;<br class="">
cfg.funparameter = 'mask4';<br class="">
ft_sourceplot(cfg,mri_norm1)</span></p>
<div style="margin-bottom: 0.0001pt; line-height: normal;" class=""><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class=""> </span><br class="webkit-block-placeholder">
</div>
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">%The result doesn't look so good, big part of the area seems to fit inside of the gaps between brain
 tissue!</span></p>
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">So this doesn't seem to have worked out. My next attempt was to directly use ft_convert_coordsys. This
 fixed the cutting issue, but it didn't solve the problem of results looking strange.</span></p>
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">So my other idea was to try with
<br class="">
<br class="">
template=ft_read_mri('C:\PathToFT\external\spm8\templates\T1.nii');<br class="">
<br class="">
cfg=[];<br class="">
cfg.method='spm';<br class="">
cfg.coordsys='spm';<br class="">
mri_realigned=ft_volumerealign(cfg,mri_resliced,template);</span></p>
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">But this produces very obviously wrong results, like coronal slices on sagittal plane.
</span></p>
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class="">I'm also not sure if I should be trying to somehow transform an atlas to fit the individual MRI that
 I'm using?<br class="">
<br class="">
All the best,<br class="">
Andreja Kostić<br style="mso-special-character:line-break" class="">
<br style="mso-special-character:line-break" class="">
</span></p>
<div style="margin-bottom: 0.0001pt; line-height: normal;" class=""><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class=""> </span><br class="webkit-block-placeholder">
</div>
<div style="margin-bottom: 0.0001pt; line-height: normal;" class=""><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class=""> </span><br class="webkit-block-placeholder">
</div>
<p class="MsoNormal" style="margin-bottom:12pt;line-height:normal"><span style="font-size:12pt;font-family:"Times New Roman","serif"" lang="EN-US" class=""><br class="">
<br class="">
<br style="mso-special-character:line-break" class="">
<br style="mso-special-character:line-break" class="">
</span></p>
<div class=""><span style="mso-ansi-language:EN-US" lang="EN-US" class=""> </span><br class="webkit-block-placeholder">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>