Reply To: combine and delete labels

Forums Forums General Questions combine and delete labels Reply To: combine and delete labels

#969
Anand Joshi
Moderator

Thanks, 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)