Browse Source

gin commit from SUND33778

Modified files: 1
Frederik Filip Stæger 4 years ago
parent
commit
598159f879
1 changed files with 1 additions and 1 deletions
  1. 1 1
      preprocess.py

+ 1 - 1
preprocess.py

@@ -111,6 +111,7 @@ def split_nii_channels(nii_path, out_dir=None, flip=False, mask_index=-1, bias=F
 
         if i == mask_index:
             channel_data = mask_foreground(channel_data)
+            channel_data = channel_data/np.mean(channel_data)
 
         new_header = nii_header
         new_header['dim'][0] = 2
@@ -158,7 +159,6 @@ if __name__ == '__main__':
     parser.add_argument("file", help="Location of file to process")
     parser.add_argument("dir", help="Directory for preprocessed Files")
     parser.add_argument("-s", type=int, help="Series to extract")
-    parser.add_argument('-b', type=bool, default= True, help='Bias field correct image')
     parser.add_argument('--pdim', type=float, help='Pixel dimensions (Retrieved from Tiff file if not set)')
     args = parser.parse_args()