question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Q: CTF coregistration with separate coil position?

See original GitHub issue

Problem

I am trying to coregister CTF data with an MRI to produce a -trans.fif

What I have

The MEG data is separate from the positions in digitizer space so the raw file doesn’t know about: hpi_coils.txt, head_shape.txt, fiducials.txt.

The HPI coil positions in MEG device space seem to be stored in the raw file: 'dig_points' and 'coord_trans' are present in raw.info['hpi_results'] after reading the raw.

Where I was going

I thought I would

  1. create a mne.channels.DigMontage from this data (I am just unsure whether raw.info['hpi_results'][0]['coord_trans'] corresponds to the parameter 'dev_head_t' required by DigMontage).
  2. apply this montage to my raw file using raw.set_montage(my_new_montage).save(raw_fname).

Where I’m stuck

However, mne.gui.coregistration still does not show the head shape positions nor the HPI coils.

Any idea how to proceed?

(For the KIT, thanks to @teonbrooks, this is handle at the reading stage (read_raw_kit needs the headshape to create the raw), and in the Elekta the position are in the raw.fif in the first place.)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:36 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
romquentincommented, Jun 13, 2016

Ok. Thanks again!

1reaction
kingjrcommented, Jun 12, 2016

Thanks @LauraGwilliams !

@romquentin: @teonbrooks and I met and manage to incorporate the HPI, fiducials and digitized head shape points in an MNE object: https://gist.github.com/kingjr/8f971c73c79712b547cdd55c661c6a5a

you need to :

  • write a parser to extract the HPI, head shape and fiducials as numpy arrays similar to what is in the gist.
  • duplicate your HPI, as the read_dig_montage expect hpi points that are called lpa, rpa and nasion for the coordinates transformation, and will use the other as hpi coils.
  • save your mne object on the hard drive as mne.gui.coregistration expects a file and not an mne instance directly.

If you’re ok, I’ll close the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started with Yokogawa data
With the MEG we have determined the position of the forehead marker coils relative to the MEG dewar. Using ft_sourceplot we can determine...
Read more >
SPM12 Manual - Wellcome Centre for Human Neuroimaging
Each number refers to the position of a slice within the image file. The order of numbers within the vector is the temporal...
Read more >
Discrimination of cortical laminae using MEG - PMC
For example, using conventional co-registration techniques (i.e. fiducial ... included designated locations for placement of fiducial coils.
Read more >
Algorithms and other implementation details
continuous head position indicator (HPI) coil channels ... These data can be acquired separately from the MPRAGE data ... from mne coreg.
Read more >
Coregistration of the TMS coil position used to target ...
... Motor imagery is a distinct, dissociable process compared to visual imagery, which is engaged by mental simulation of non-bodily stimuli [30,34]. Indeed, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found