|
@@ -18,6 +18,7 @@ def get_out_paths(out_dir, stem):
|
|
|
|
|
|
|
|
|
def bias_field_correction(image, output, dim=2):
|
|
|
+ print('Running N4BiasFieldCorrection on input slice.')
|
|
|
N4BiasFieldCorrection(
|
|
|
input_image=image,
|
|
|
output_image=output,
|
|
@@ -30,7 +31,7 @@ def image_data_to_nii(pixdim, image_data, shrink, out_dir, file_path, save_unsca
|
|
|
scale = 1/shrink
|
|
|
new_dim = (round(image_dim[1] * scale), round(image_dim[0] * scale))
|
|
|
new_arr = np.ndarray(new_dim + (image_data.shape[2],))
|
|
|
- print(f'Pixel dimensions: {pixdim} um')
|
|
|
+ print(f'Pixel dimensions: {pixdim} mm')
|
|
|
|
|
|
for i in range(0,image_data.shape[2]):
|
|
|
cur_channel = image_data[:, :, i]
|