Skip to content

Commit

Permalink
Readability updates for preprocess.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
aecelaya committed Oct 8, 2024
1 parent a153f3f commit 9771ff5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mist/preprocess_data/preprocess.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Preprocessing functions for medical images and masks."""
import os
import argparse
from typing import Dict, List, Tuple, Any, Optional
from typing import Dict, List, Tuple, Any, Optional, Union

import ants
import numpy as np
Expand Down Expand Up @@ -321,7 +321,7 @@ def preprocess_example(
fg_bbox: Optional[Dict[str, int]]=None,
use_dtm: bool=False,
normalize_dtm: bool=False,
) -> Dict[str, npt.NDArray[Any]]:
) -> Dict[str, Union[npt.NDArray[Any], Dict[str, int], None]]:
"""Preprocessing function for a single example.
Args:
Expand Down Expand Up @@ -439,7 +439,7 @@ def preprocess_example(
def convert_nifti_to_numpy(
image_list: List[str],
mask: Optional[str]=None,
) -> Dict[str, Any]:
) -> Dict[str, Union[npt.NDArray[Any], None]]:
"""Convert NIfTI images to numpy arrays.
Args:
Expand Down

0 comments on commit 9771ff5

Please sign in to comment.