Skip to content

Commit 050b4d2

Browse files
author
Douglas Greve
committed
gems_compute_atlas_probs. Added --samseg-subdir
1 parent 6452e47 commit 050b4d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

samseg/gems_compute_atlas_probs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ parser.add_argument('--save-figs', action='store_true', default=False, help='Sav
3737
parser.add_argument('--save-average-figs', action='store_true', default=False, help='Save average rasterized prior.')
3838
parser.add_argument('--subjects_file', help='Text file with list of subjects.')
3939
parser.add_argument('--labels_file', help='Text file with list of labels (instead of --labels).')
40+
parser.add_argument('--samseg-subdir', default='samseg',help='Name of samseg subdir in subject/mri folder')
41+
4042
args = parser.parse_args()
4143

4244
if not os.path.exists(args.out_dir):
@@ -142,7 +144,7 @@ for level, mesh_collection_file in enumerate(args.mesh_collections):
142144
affine = nib.load(os.path.join(args.segmentations_dir, subject_dir, args.segmentation_name)).affine
143145

144146
if args.from_samseg:
145-
history = np.load(os.path.join(args.subjects_dir, subject_dir, 'mri', 'samseg', 'history.p'), allow_pickle=True)
147+
history = np.load(os.path.join(args.subjects_dir, subject_dir, 'mri', args.samseg_subdir, 'history.p'), allow_pickle=True)
146148
else:
147149
history = np.load(os.path.join(args.subjects_dir, subject_dir, 'history.p'), allow_pickle=True)
148150

0 commit comments

Comments
 (0)