- This topic has 5 replies, 3 voices, and was last updated 7 years, 3 months ago by
mike214.
-
AuthorPosts
-
-
November 30, 2017 at 9:14 am #968
mike214
ParticipantDear BrainSuite team
Great toolbox. Great work with the GUI!
I’ve tried now for several days…..without any success.
Related to my research question, I need an atlas (in MNI space for group comparisons) that is based on fear-related brain regions (amygdala, OFC…etc). Therefore, I wanted to
1) delete labels in the BrainAtlas1 which are not fear-related
2) combine the hemispheric labels to bilateral labelsI’ve tried with masking, painting…whatever. Is it really so hard ? It seems to…
Would be nice to have two new buttons in the next release: delete and combine labels. That would be nice!many thanks for your efforts, mike
-
November 30, 2017 at 11:34 am #969
Anand Joshi
ModeratorThanks, Mike for your feedback. With the current release, you can use the Matlab functions from SVReg source code to load the label nifti files in Matlab, delete and combine the labels you want, and then save the file.
Here is a pseudocode
v=load_nii_BIG_Lab(labelfilename);
v.img(v.img==l1||v.img==l2)=l1; %combine labels l1 and l2
v.img(v.img==l3)=0; %delete label l3
save_untouch_nii(out_file, v) -
November 30, 2017 at 9:09 pm #970
David Shattuck
KeymasterOne way you can do this is by using the LabelMask tool, which is in the Delineation Panel. If you press ‘Update List’ you will see all of the labels that are in the label volume. Select all of the ones you want to keep, then press Make Mask. If you then load the label file as the primary volume, you can then apply the mask to the volume (press ‘Apply’), and it will set all of the labels outside of the mask to 0. Save the primary volume as your new label volume, and then load it. It should only have the labels that you want.
-
December 1, 2017 at 3:32 am #971
mike214
Participantmany thanks for your help!
Both ways worked well, except combining the labelsv.img(v.img==l1||v.img==l2)=l1; %combine labels l1 and l2
returns
Operands to the || and && operators must be convertible to logical scalar valuesusing only | instead of || does not combine the labels…
any idea ?
many thanks, mike -
December 1, 2017 at 10:13 am #972
Anand Joshi
ModeratorFor combining
v.img(v.img==l1|v.img==l2)=l1;
should work. What happens when you do that? -
December 2, 2017 at 4:39 am #973
mike214
Participantyes, it does! sry, was checking wrong filename.
Great! You saved my publication :)
many thanks
-
-
AuthorPosts
- You must be logged in to reply to this topic.