[Homer-users] AtlasViewer registration

David Boas dboas at nmr.mgh.harvard.edu
Thu May 29 07:14:57 EDT 2014
Search archives:

Another Update... on AtlasViewer spatial units... and on Subject 
Specific Anatomies.

At this point it is really best (i.e. required) to use mm spatial units 
for AtlasViewer. For the digpts.txt file that Theresa sent, the 
dimensions of the head are approximately 8x22x16 units. It is likely 
that these are not mm units. They are probably cm units.

The point is, when you use a 3D digitizer, be sure you know what the 
spatial units are. And when you make the digpts.txt file, you should 
convert them to mm units.

The mm units are important for the optical properties when running the 
Monte Carlo photon migration forward problem. I don't think it affects 
much else of importance. However, in this case, use cm units did cause 
the ref pts to float quite a distance from the surface of the head. As a 
suspected, we have an absolute offset to displace these ref pts from the 
surface of the head so that they can be better visualized. This offset 
is about 1 unit. 1 cm is a bigger displacement than 1 mm and that is why 
Theresa saw the ref pts extended so far from the head. I will alter this 
part of the code so that the displacement is relative to head size, not 
an absolute offset.

Below, Theresa also mentions adding artificial d9 through d16 in the 
digpts.txt file. I'll look into this more to make sure the code only 
requires you to provide optode positions in the digpts.txt file that are 
included in the measurement list ml.

As for using subject specific MRI's, we do have alpha-version code for 
that. Let me know if you are interested in trying it out. AtlasViewer 
already supports using subject specific anatomies. The issue is that you 
have to create all of the right files and put them in 
SUBJ_DIR/anatomical . I've created a script that you can run that will 
create all of the needed files. All you need is a mesh of the head 
surface and the brain surface. These meshes need to be in the same 
coordinate system. You'd be surprised how easy it is to create these two 
surfaces in two different coordinate systems. Make sure they are in the 
same coordinate system otherwise my script will not work for you. The 
meshes need to be saved in FreeSurfer format. Homer includes a script
     write_surf(fname, vertex_coords, faces)
that will create a mesh file in FreeSurfer format.
     fname - is the file name for the mesh. This should either be 
headsurf.mesh or pialsurf.mesh
     vertex_coords - this is a matrix with nv x 3 elements containing 
the X,Y,Z coordinates of the nv vertices on the mesh.
     faces - this is a matrix with nf x 3 elements pointing to the 3 
vertices that define the nf faces on the mesh.
                 Note that faces points to the first vertex as element 
0! Please check this. That is the usage that should be saved in the
                 file. Matlab wants the first vertex to be referred to 
as element 1, but the FreeSurfer convention is a C convention which
                 starts with index 0. There are different versions of 
write_surf.m out there that either subtract one from faces or doesn't.
                 I am cleaning this up in Homer so that what you must 
face to write_surf.m is faces pointing to the first vertex
                 with index 0. There is the companion function 
read_surf.m. To use the returned faces in matlab, you must add 1 to it.

If you want to try out the script I made for this, let me know and I 
will send it to you. Once it is tested a little more, I will then 
release it as part of Homer / AtlasViewer.

David














On 5/28/14, 4:19 PM, Moulton, Theresa (NIH/CC/RMD) [F] wrote:
>
> Update....
>
> Based on this feedback, I did update my developer's version again to 
> the latest files. I didn't pay close enough attention to the files 
> that had changed, but the registration of the probe to the surface 
> does not distort the optodes arrangement as it had previously. The 
> 10/20 ref points are still floating, but the optodes and reference  
> points look reasonable to the surface of the scalp, and the MNI 
> coordinates make sense for the areas we are targeting.
>
> Another thing that might be useful to others -- In my digpts.txt file, 
> I discovered that I needed to artificially add in d9 through d16 -- 
> those are detectors that are not in our CW6 setup, but are modules 
> that could be added. They are required placeholders in the SD file, 
> but I wasn't accounting for them in the digpts because we don't 
> collect 3D coordinates for them because they are not real. I copied 
> the Cz position as the location of each of those detectors, and 
> AtlasViewer was able to determine the configuration so I was able to 
> view the measurement list and project the channels to the cortex (vs. 
> just the optodes previously).
>
> We look forward to trying to use these features with a 
> subject-specific MRI vs the Colin atlas as mentioned in the last 
> training -- we'll watch the listserv when that documentation/update is 
> available.
>
> Many thanks,
>
> Theresa
>
> *From:*David Boas [mailto:dboas at nmr.mgh.harvard.edu]
> *Sent:* Wednesday, May 28, 2014 9:22 AM
> *To:* homer-users at nmr.mgh.harvard.edu
> *Subject:* Re: [Homer-users] AtlasViewer registration
>
> Theresa,
> Thanks for sharing your digpts.txt file. I was able to register the 
> atlas to the digpts and view the probe on the surface of the head. 
> Register probe to surface worked well for me as did project to cortex. 
> I don't have your SD information and so can't verify the behavior of 
> project channels to cortex.
>
> I do see that the 10-20 ref pts are floating above the head. This also 
> confuses me. I have to check with Jay, but I suspect he applies some 
> absolute offset projecting these ref points away from the center of 
> the head so that they float a little bit above the surface of the 
> head. Perhaps your dig pt units are not standard and thus his 
> "absolute" offset causes the ref pts to appear floating away from the 
> head. I need to check with Jay on this.
>
> I didn't recreate the problem you indicated of the probe becoming 
> distorted when you registered the probe. Perhaps send me your SD info 
> (either sd file or nirs file) directly to me at 
> dboas at nmr.mgh.harvard.edu <mailto:dboas at nmr.mgh.harvard.edu> and I can 
> try again.
>
> Thanks,
> David
>
>
> On 5/27/14, 4:56 PM, Moulton, Theresa (NIH/CC/RMD) [F] wrote:
>
>     Hi Homer users,
>
>     I'm writing to ask for some feedback about an issue I've
>     encountered when using AtlasViewer to register digitized points to
>     the Atlas.
>
>     We have digitized the location of the optodes on our probe, as
>     well as Nz, Iz, Ar, and Al using reflective markers on the Vicon
>     system, so the markers are definitively 'floating' above the head
>     of the participant, in a similar way to the use of other systems
>     discussed in the AtlasViewer training video. Attached is a word
>     document showing screen shots of the different steps within
>     AtlasViewer, as well as my digpts.txt file. When AtlasViewer
>     initializes, we can see the markers, but no view of the brain --
>     I'm guessing because the origin of the two coordinate systems are
>     appreciably different. When I register the points to the Atlas via
>     the Tool menu, there is a very nice looking approximation of where
>     the probe should be -- it is symmetrical, matches the shape of the
>     probe, and rests on the surface of the atlas skull. However, I
>     also see that the Atlas reference points are all floating above
>     the apparent surface of the Atlas skull.
>
>     When I take the next step to register the probe to the surface, I
>     am left with optodes floating above the skull, and distorted
>     compared to the real probe. I am able to project the individual
>     optodes to the cortex, but not the channels (there is also a .nirs
>     file in the folder that has the associated SD configuration for
>     this probe). Although this step doesn't even seem relevant when
>     the probe arrangement has changed so much.
>
>     Any suggestions about where I may be going wrong? Should I be
>     taking into account an approximate offset between the center of
>     the reflective marker and the surface of the skull already in the
>     digpts file? I've played around with translating my digpts
>     coordinate system so the origin was near the middle of the skull,
>     but that did not change the results. The participant is an adult,
>     of fairly average head size.
>
>     Thanks in advance for any suggestions you may have.
>
>     Kind regards,
>
>     Theresa
>
>     *Theresa Sukal Moulton, DPT, PhD*
>
>     Post-doctoral Fellow
>
>     Functional & Applied Biomechanics Section
>
>     Rehabilitation Medicine Department
>
>     National Institutes of Health Clinical Center
>
>     10 Center Drive, Room 1-1425
>
>
>
>
>     _______________________________________________
>
>     Homer-users mailing list
>
>     Homer-users at nmr.mgh.harvard.edu  <mailto:Homer-users at nmr.mgh.harvard.edu>
>
>     https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users
>
>
>
> -- 
> ==============================================================
> fNIRS 2014 Conference in Montreal Oct 10-12, 2014
> The conference is preceded by a one day educational workshop.
> Abstract Deadline June 16, 2014
> seehttp://fnirs2014.org  for more details
> ==============================================================
>
>
> _______________________________________________
> Homer-users mailing list
> Homer-users at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/homer-users

-- 
==============================================================
fNIRS 2014 Conference in Montreal Oct 10-12, 2014
The conference is preceded by a one day educational workshop.
Abstract Deadline June 16, 2014
see http://fnirs2014.org for more details
==============================================================

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/homer-users/attachments/20140529/344417af/attachment.html 


More information about the Homer-users mailing list