Skip to content

Commit

Permalink
Fix name of overlay generator in warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lvsltz committed Apr 11, 2024
1 parent 22945aa commit e0d5911
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion nnunetv2/experiment_planning/verify_dataset_integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def check_cases(image_files: List[str], label_file: str, expected_num_channels:
if not np.allclose(affine_image, affine_seg):
print('WARNING: Affine is not the same for image and seg! \nAffine image: %s \nAffine seg: %s\n'
'Image files: %s. \nSeg file: %s.\nThis can be a problem but doesn\'t have to be. Please run '
'nnUNet_plot_dataset_pngs to verify if everything is OK!\n'
'nnUNetv2_plot_overlay_pngs to verify if everything is OK!\n'
% (affine_image, affine_seg, image_files, label_file))

# sitk checks
Expand Down
8 changes: 4 additions & 4 deletions nnunetv2/imageio/nibabel_reader_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class NibabelIO(BaseReaderWriter):
Nibabel loads the images in a different order than sitk. We convert the axes to the sitk order to be
consistent. This is of course considered properly in segmentation export as well.
IMPORTANT: Run nnUNet_plot_dataset_pngs to verify that this did not destroy the alignment of data and seg!
IMPORTANT: Run nnUNetv2_plot_overlay_pngs to verify that this did not destroy the alignment of data and seg!
"""
supported_file_endings = [
'.nii.gz',
Expand Down Expand Up @@ -67,7 +67,7 @@ def read_images(self, image_fnames: Union[List[str], Tuple[str, ...]]) -> Tuple[
print(original_affines)
print('Image files:')
print(image_fnames)
print('It is up to you to decide whether that\'s a problem. You should run nnUNet_plot_dataset_pngs to verify '
print('It is up to you to decide whether that\'s a problem. You should run nnUNetv2_plot_overlay_pngs to verify '
'that segmentations and data overlap.')
if not self._check_all_same(spacings_for_nnunet):
print('ERROR! Not all input images have the same spacing_for_nnunet! This might be caused by them not '
Expand Down Expand Up @@ -104,7 +104,7 @@ class NibabelIOWithReorient(BaseReaderWriter):
Nibabel loads the images in a different order than sitk. We convert the axes to the sitk order to be
consistent. This is of course considered properly in segmentation export as well.
IMPORTANT: Run nnUNet_plot_dataset_pngs to verify that this did not destroy the alignment of data and seg!
IMPORTANT: Run nnUNetv2_plot_overlay_pngs to verify that this did not destroy the alignment of data and seg!
"""
supported_file_endings = [
'.nii.gz',
Expand Down Expand Up @@ -149,7 +149,7 @@ def read_images(self, image_fnames: Union[List[str], Tuple[str, ...]]) -> Tuple[
print(reoriented_affines)
print('Image files:')
print(image_fnames)
print('It is up to you to decide whether that\'s a problem. You should run nnUNet_plot_dataset_pngs to verify '
print('It is up to you to decide whether that\'s a problem. You should run nnUNetv2_plot_overlay_pngs to verify '
'that segmentations and data overlap.')
if not self._check_all_same(spacings_for_nnunet):
print('ERROR! Not all input images have the same spacing_for_nnunet! This might be caused by them not '
Expand Down
4 changes: 2 additions & 2 deletions nnunetv2/imageio/simpleitk_reader_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ def read_images(self, image_fnames: Union[List[str], Tuple[str, ...]]) -> Tuple[
print(origins)
print('Image files:')
print(image_fnames)
print('It is up to you to decide whether that\'s a problem. You should run nnUNet_plot_dataset_pngs to verify '
print('It is up to you to decide whether that\'s a problem. You should run nnUNetv2_plot_overlay_pngs to verify '
'that segmentations and data overlap.')
if not self._check_all_same(directions):
print('WARNING! Not all input images have the same direction!')
print('Directions:')
print(directions)
print('Image files:')
print(image_fnames)
print('It is up to you to decide whether that\'s a problem. You should run nnUNet_plot_dataset_pngs to verify '
print('It is up to you to decide whether that\'s a problem. You should run nnUNetv2_plot_overlay_pngs to verify '
'that segmentations and data overlap.')
if not self._check_all_same(spacings_for_nnunet):
print('ERROR! Not all input images have the same spacing_for_nnunet! (This should not happen and must be a '
Expand Down

0 comments on commit e0d5911

Please sign in to comment.