[Neuroimaging] select all voxels in one hemisphere
Luke Bloy
luke.bloy at gmail.com
Thu Nov 21 15:02:16 EST 2019
Not sure how accurate you need this to be but a rough approach would be :
1) Manually make R/L labels on a atlas/template brain. MNI152 from fsl for
instance.
2) for each new subject coregister your subject to the atlas. Affine
registration after a rough brain extraction would probably be sufficient
3) transform your R/L labels into subject space.
This would be a relatively simple pipeline to put together using simpleITK
or maybe one of the pure python neuroimaging tools (Dipy maybe?)
On Thu, Nov 21, 2019 at 1:52 PM Sam W <samfmri at gmail.com> wrote:
> Hi Amit!
>
> Thanks for your suggestions. I just need to assign a number to all left
> hemisphere voxels (and leave right hemisphere voxels unchanged), so using
> freesurfer for this purpose might really be an overkill. I was hoping I
> could get away with combining numpy with nilearn/nibabel, is this not
> feasible?
>
> Best regards,
> Sam
>
> On Wed, Nov 20, 2019 at 11:41 PM Amit Akula <amitvakula at gmail.com> wrote:
>
>> Hi Sam!
>>
>> Hope you are doing well.
>>
>> There are many segmentation algorithms that can be used to do this in a
>> more robust approach.
>>
>> The Roland Henry Laboratory at UCSF (where I work) generally uses
>> Freesurfer's recon_all
>> <https://surfer.nmr.mgh.harvard.edu/fswiki/recon-all> pipeline. It can
>> be used go generate a brain mask and further pipelines
>> <http://narr.bmap.ucla.edu/protocols/data_processing_archives/convert_freesurfer_outputs_and_calculate_dist_q/> can
>> be use to generate hemisphere masks. It may be a bit overkill for your work
>> as it does much more subcortical segmentations.
>>
>> There is also a way to manually segment/correct ROIs using nilearn if you
>> want to manually do more sophisticated segmentations/corrections. Here
>> <https://nilearn.github.io/auto_examples/04_manipulating_images/plot_roi_extraction.html> is
>> a starting guide on that using nilearn.
>>
>> Let me know if you want to take this offline and I can walk you through
>> it.
>>
>> Sincerely,
>> Amit
>>
>> p.s. I can look into and send you more stuff like hemisplit
>> <https://nipype.readthedocs.io/en/0.12.1/interfaces/generated/nipype.interfaces.brainsuite.brainsuite.html#hemisplit>,
>> etc. if you would like a more focused tool other than recon_all. Lemme know!
>>
>> On Wed, Nov 20, 2019 at 2:25 PM Sam W <samfmri at gmail.com> wrote:
>>
>>> Hello!
>>> I've been trying unsuccessfully to select all voxels in one hemisphere
>>> using nilearn/nibabel
>>> I tried selecting all voxels that are to the left of the center of the
>>> image, something along these lines:
>>>
>>> im = load_img('my_im.nii')
>>> mid = int(np.ceil(im.shape[0]/2)) #centre of image
>>> data = im.get_data()
>>> data[mid:,:,:] #this should select the left side of image
>>>
>>> This wont work however because mid might not be exactly the middle of
>>> the brain...
>>> Is there a better way to do this?
>>> Thanks!
>>> Sam
>>> _______________________________________________
>>> Neuroimaging mailing list
>>> Neuroimaging at python.org
>>> https://mail.python.org/mailman/listinfo/neuroimaging
>>>
>> _______________________________________________
>> Neuroimaging mailing list
>> Neuroimaging at python.org
>> https://mail.python.org/mailman/listinfo/neuroimaging
>>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20191121/e1025e9c/attachment.html>
More information about the Neuroimaging
mailing list