print 'pt_id {}: VOI JSON file was NOT found!'.format(pt_id) continue for jj in voi_lps_paths: # determine breast side info_fname = os.path.basename(jj) check = re.search(r'{}_(\w+)_(\d+).info.json'.format(pt_id), info_fname) if check: breast_side = check.group(1) else: print 'pt_id {}: cannot determine breast side!'.format(pt_id) print 'breast_side: {}'.format(breast_side) # initialize a Dataframe for each patient data chunk CENTER, HALFLENGTHS, time_sorted_IMNAMES = ImSeg.GetImInfo(jj) # DMI MRI volumes (from brtool output) pt_series_dir = glob.glob('{}/{:0>3d}/*/*'.format(imdir, pt_id))[0] pt_dmi_list = [ '{}/dce/{}'.format(pt_series_dir, ff) for ff in time_sorted_IMNAMES ] print 'image file dmi name: {}'.format(pt_dmi_list[0]) dceSeries = dmi.DMI(pt_dmi_list[0]) mri_itk_img = ITKImageHelper.generate_oriented_itkImage(dceSeries) IG_mri_img = image_geometry.ImageGeometry(mri_itk_img) voxsize = IG_mri_img.samplingRCS for ii in range(len(voxsize)): tmp_dict = {}