Hello,
I was wondering whether there is a way to assign a different intensity value on each voxel within a parcellation file (such as aseg.mgz). What I’m essentially trying to do is create a file (using the aseg.mgz file as a template) where each voxel represents a different ROI. I can think of a way to do that in Freeview for each individual voxel but I wasn’t sure whether there was a more efficient/automated way in either bash or matlab. Let me know if the above doesn’t make any sense, and thanks in advance!
Best, Panos
Hi Panos
I'm not sure I understand. Isn't that already what the aseg is? E.g. voxel intensity 17 means left hippocampus?
Bruce On Sun, 7 Jul 2019, Fotiadis, Panagiotis wrote:
Hello,
I was wondering whether there is a way to assign a different intensity value on each voxel within a parcellation file (such as aseg.mgz). What I’m essentially trying to do is create a file (using the aseg.mgz file as a template) where each voxel represents a different ROI. I can think of a way to do that in Freeview for each individual voxel but I wasn’t sure whether there was a more efficient/automated way in either bash or matlab.
Let me know if the above doesn’t make any sense, and thanks in advance!
Best,
Panos
Hi Bruce,
Thanks for your response! Within aseg, however, there is a group of voxels with intensity 17 (and therefore comprising the left hippocampus). I was mainly wondering whether there is a way to assign a different intensity value to each individual voxel in aseg (so that for instance if you had 40,000 voxels in aseg.mgz then you would assign each one with a different intensity value so that you would end up with 40,000 "ROIs" ). Hope this clarifies a little bit my semi-abstract question!
Thanks again, Panos
On 7/7/19, 9:30 PM, "freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Bruce Fischl" <freesurfer-bounces@nmr.mgh.harvard.edu on behalf of fischl@nmr.mgh.harvard.edu> wrote:
Hi Panos
I'm not sure I understand. Isn't that already what the aseg is? E.g. voxel intensity 17 means left hippocampus?
Bruce On Sun, 7 Jul 2019, Fotiadis, Panagiotis wrote:
> > Hello, > > > > I was wondering whether there is a way to assign a different intensity value on each voxel within a > parcellation file (such as aseg.mgz). What I’m essentially trying to do is create a file (using the > aseg.mgz file as a template) where each voxel represents a different ROI. I can think of a way to do > that in Freeview for each individual voxel but I wasn’t sure whether there was a more > efficient/automated way in either bash or matlab. > > Let me know if the above doesn’t make any sense, and thanks in advance! > > > > Best, > > Panos > > > > >
oh, I see. It would be pretty easy to do in matlab. Something like:
v = load_mgh('aseg.mgz'); vnew = zeros(size(v)) left_hippo_ind = find(v == 17); for i=1:length(left_hippo_ind) vnew(i) = i end
On Mon, 8 Jul 2019, Fotiadis, Panagiotis wrote:
Hi Bruce,
Thanks for your response! Within aseg, however, there is a group of voxels with intensity 17 (and therefore comprising the left hippocampus). I was mainly wondering whether there is a way to assign a different intensity value to each individual voxel in aseg (so that for instance if you had 40,000 voxels in aseg.mgz then you would assign each one with a different intensity value so that you would end up with 40,000 "ROIs" ). Hope this clarifies a little bit my semi-abstract question!
Thanks again, Panos
On 7/7/19, 9:30 PM, "freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Bruce Fischl" <freesurfer-bounces@nmr.mgh.harvard.edu on behalf of fischl@nmr.mgh.harvard.edu> wrote:
Hi Panos
I'm not sure I understand. Isn't that already what the aseg is? E.g. voxel intensity 17 means left hippocampus?
Bruce On Sun, 7 Jul 2019, Fotiadis, Panagiotis wrote:
Hello,
I was wondering whether there is a way to assign a different intensity value on each voxel within a parcellation file (such as aseg.mgz). What I’m essentially trying to do is create a file (using the aseg.mgz file as a template) where each voxel represents a different ROI. I can think of a way to do that in Freeview for each individual voxel but I wasn’t sure whether there was a more efficient/automated way in either bash or matlab.
Let me know if the above doesn’t make any sense, and thanks in advance!
Best,
Panos
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi Bruce,
That’s exactly what I needed, thank you!
Best, Panos
On 7/7/19, 10:18 PM, "freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Bruce Fischl" <freesurfer-bounces@nmr.mgh.harvard.edu on behalf of fischl@nmr.mgh.harvard.edu> wrote:
oh, I see. It would be pretty easy to do in matlab. Something like:
v = load_mgh('aseg.mgz'); vnew = zeros(size(v)) left_hippo_ind = find(v == 17); for i=1:length(left_hippo_ind) vnew(i) = i end
On Mon, 8 Jul 2019, Fotiadis, Panagiotis wrote:
> Hi Bruce, > > Thanks for your response! Within aseg, however, there is a group of voxels with intensity 17 (and therefore comprising the left hippocampus). I was mainly wondering whether there is a way to assign a different intensity value to each individual voxel in aseg (so that for instance if you had 40,000 voxels in aseg.mgz then you would assign each one with a different intensity value so that you would end up with 40,000 "ROIs" ). > Hope this clarifies a little bit my semi-abstract question! > > Thanks again, > Panos > > On 7/7/19, 9:30 PM, "freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Bruce Fischl" <freesurfer-bounces@nmr.mgh.harvard.edu on behalf of fischl@nmr.mgh.harvard.edu> wrote: > > Hi Panos > > I'm not sure I understand. Isn't that already what the aseg is? E.g. > voxel intensity 17 means left hippocampus? > > Bruce > On Sun, 7 Jul 2019, Fotiadis, > Panagiotis wrote: > > > > > Hello, > > > > > > > > I was wondering whether there is a way to assign a different intensity value on each voxel within a > > parcellation file (such as aseg.mgz). What I’m essentially trying to do is create a file (using the > > aseg.mgz file as a template) where each voxel represents a different ROI. I can think of a way to do > > that in Freeview for each individual voxel but I wasn’t sure whether there was a more > > efficient/automated way in either bash or matlab. > > > > Let me know if the above doesn’t make any sense, and thanks in advance! > > > > > > > > Best, > > > > Panos > > > > > > > > > > > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > >
freesurfer@nmr.mgh.harvard.edu