Hi, I have generated numpy binary mask arrays with dimensions 144144144, but I am having trouble resampling it back. I saved the array to nii.gz by:
file_image = nib.Nifti1Image(file_array, affine=np.eye(4))
and use the given cli_resampling_back.py to restore resolutions. I followed the instruction and extracted the original resolution to a csv:
,PatientID,resolution_x,resolution_y,resolution_z,Resolution_x,Resolution_y,Resolution_z
0,CHUV001,1.3671879768371582,1.3671879768371582,3.2699999809265137
1,CHUV002,1.3671879768371582,1.3671879768371582,3.2699999809265137
2,CHUV003,1.3671879768371582,1.3671879768371582,3.2699999809265137
3,CHUV004,1.3671879768371582,1.3671879768371582,3.2699999809265137
4,CHUV005,1.3671879768371582,1.3671879768371582,3.2699999809265137
5,CHUV006,1.3671879768371582,1.3671879768371582,3.2699999809265137
6,CHUV007,1.3671879768371582,1.3671879768371582,3.2699999809265137
7,CHUV008,1.3671879768371582,1.3671879768371582,3.2699999809265137
8,CHUV009,1.3671879768371582,1.3671879768371582,3.2699999809265137
9,CHUV010,1.3671879768371582,1.3671879768371582,3.2699999809265137
10,CHUV011,1.3671879768371582,1.3671879768371582,3.2699999809265137
11,CHUV012,0.9765620231628418,0.9765620231628418,4.25
12,CHUV013,0.9765620231628418,0.9765620231628418,4.25
13,CHUV014,0.9765620231628418,0.9765620231628418,4.25
14,CHUV015,0.9765620231628418,0.9765620231628418,4.25
15,CHUV016,0.9765620231628418,0.9765620231628418,4.25
16,CHUV017,0.9765620231628418,0.9765620231628418,1.25
17,CHUV018,0.9765620231628418,0.9765620231628418,1.25
18,CHUV019,0.9765620231628418,0.9765620231628418,1.25
19,CHUV020,0.9765620231628418,0.9765620231628418,3.2699999809265137
20,CHUV021,0.9765620231628418,0.9765620231628418,3.2699999809265137
21,CHUV022,1.3671879768371582,1.3671879768371582,3.2699999809265137
22,CHUV023,1.3671879768371582,1.3671879768371582,3.2699999809265137
23,CHUV024,1.3671879768371582,1.3671879768371582,3.2699999809265137
24,CHUV025,1.3671879768371582,1.3671879768371582,3.2699999809265137
25,CHUV026,1.3671879768371582,1.3671879768371582,3.2699999809265137
26,CHUV027,1.3671879768371582,1.3671879768371582,3.2699999809265137
27,CHUV028,1.3671879768371582,1.3671879768371582,3.2699999809265137
28,CHUV029,1.3671879768371582,1.3671879768371582,3.2699999809265137
29,CHUV030,0.9765620231628418,0.9765620231628418,1.0
30,CHUV031,1.3671879768371582,1.3671879768371582,3.2699999809265137
31,CHUV032,1.3671879768371582,1.3671879768371582,3.2699999809265137
32,CHUV033,0.9765620231628418,0.9765620231628418,3.2699999809265137
33,CHUV034,1.3671879768371582,1.3671879768371582,3.2699999809265137
34,CHUV035,1.3671879768371582,1.3671879768371582,3.2699999809265137
35,CHUV036,0.9765620231628418,0.9765620231628418,1.0
36,CHUV037,1.3671879768371582,1.3671879768371582,3.2699999809265137
37,CHUV038,1.3671879768371582,1.3671879768371582,3.2699999809265137
38,CHUV039,1.3671879768371582,1.3671879768371582,3.2699999809265137
39,CHUV040,1.3671879768371582,1.3671879768371582,3.2699999809265137
40,CHUV041,1.3671879768371582,1.3671879768371582,3.2699999809265137
41,CHUV042,1.3671879768371582,1.3671879768371582,3.2699999809265137
42,CHUV043,1.3671879768371582,1.3671879768371582,3.2699999809265137
43,CHUV044,1.3671879768371582,1.3671879768371582,3.2699999809265137
44,CHUV045,1.3671879768371582,1.3671879768371582,3.2699999809265137
45,CHUV046,1.3671879768371582,1.3671879768371582,3.2699999809265137
46,CHUV047,0.9765620231628418,0.9765620231628418,1.0
47,CHUV048,0.9765620231628418,0.9765620231628418,1.0
48,CHUV049,1.3671879768371582,1.3671879768371582,3.2699999809265137
49,CHUV050,1.3671879768371582,1.3671879768371582,3.2699999809265137
50,CHUV051,1.3671879768371582,1.3671879768371582,3.2699999809265137
51,CHUV052,1.3671879768371582,1.3671879768371582,3.2699999809265137
52,CHUV053,0.9765620231628418,0.9765620231628418,1.0
But when I submitted the files, it always tells me the masks are not binary or not resampled back. I am stuck at the last step, and hopeful someone can help me please.