Skip to content

Commit

Permalink
fixed nrrd export
Browse files Browse the repository at this point in the history
  • Loading branch information
mese79 committed Feb 2, 2024
1 parent 5c50209 commit beca359
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -642,5 +642,5 @@ def export_segmentation(self, out_format="nrrd"):
self, "Jug Lab", ".", "Segmentation(*.nrrd)"
)
if selected_file is not None and len(selected_file) > 0:
nrrd.write(selected_file, self.segmentation_layer.data)
notif.show_info("Selected segmentation was saved successfully.")
nrrd.write(selected_file, np.transpose(self.segmentation_layer.data))
notif.show_info("Selected segmentation was exported successfully.")
4 changes: 2 additions & 2 deletions src/napari_sam_labeling_tools/_sam_rf_segmentation_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,5 +659,5 @@ def export_segmentation(self, out_format="nrrd"):
if selected_file is not None and len(selected_file) > 0:
if not selected_file.endswith(".nrrd"):
selected_file += ".nrrd"
nrrd.write(selected_file, self.segmentation_layer.data)
notif.show_info("Selected segmentation was saved successfully.")
nrrd.write(selected_file, np.transpose(self.segmentation_layer.data))
notif.show_info("Selected segmentation was exported successfully.")

0 comments on commit beca359

Please sign in to comment.