diff --git a/grand_challenge_forge/partials/algorithm-template/inference.py.j2 b/grand_challenge_forge/partials/algorithm-template/inference.py.j2 index 7474feb..1ae8b02 100644 --- a/grand_challenge_forge/partials/algorithm-template/inference.py.j2 +++ b/grand_challenge_forge/partials/algorithm-template/inference.py.j2 @@ -115,7 +115,7 @@ def write_json_file(*, location, content): def load_image_file_as_array(*, location): # Use SimpleITK to read a file - input_files = glob(str(location / "*.tiff")) + glob(str(location / "*.mha")) + input_files = glob(str(location / "*.tif")) + glob(str(location / "*.tiff")) + glob(str(location / "*.mha")) result = SimpleITK.ReadImage(input_files[0]) # Convert it to a Numpy array @@ -127,7 +127,7 @@ def load_image_file_as_array(*, location): def write_array_as_image_file(*, location, array): location.mkdir(parents=True, exist_ok=True) - # You may need to change the suffix to .tiff to match the expected output + # You may need to change the suffix to .tif to match the expected output suffix = ".mha" image = SimpleITK.GetImageFromArray(array) diff --git a/grand_challenge_forge/partials/example-algorithm/inference.py.j2 b/grand_challenge_forge/partials/example-algorithm/inference.py.j2 index 4d56624..2aee5b3 100644 --- a/grand_challenge_forge/partials/example-algorithm/inference.py.j2 +++ b/grand_challenge_forge/partials/example-algorithm/inference.py.j2 @@ -113,7 +113,7 @@ def write_json_file(*, location, content): def load_image_file_as_array(*, location): # Use SimpleITK to read a file - input_files = glob(str(location / "*.tiff")) + glob(str(location / "*.mha")) + input_files = glob(str(location / "*.tif")) + glob(str(location / "*.tiff")) + glob(str(location / "*.mha")) result = SimpleITK.ReadImage(input_files[0]) # Convert it to a Numpy array @@ -125,7 +125,7 @@ def load_image_file_as_array(*, location): def write_array_as_image_file(*, location, array): location.mkdir(parents=True, exist_ok=True) - # You may need to change the suffix to .tiff to match the expected output + # You may need to change the suffix to .tif to match the expected output suffix = ".mha" image = SimpleITK.GetImageFromArray(array)