SAM: Bugfix for 2D images
Summary: When clicked on a render window without image, eg. Sagittal, for a loaded 2D image, a corrupt image is written to disk for SAM daemon. This is diff fixes it by checking if the image is valid before writing for inferencing.
Test Plan:
- Load a 2D image onto Workbench.
- Init SAM tool
- Click on a render window without the image eg. Sagittal
Expected: Inferencing is NOT carried out. Only click points exist on that render window.
Reviewers: floca, kislinsk, O1 MITK Reviewer Group I
Reviewed By: kislinsk, O1 MITK Reviewer Group I
Maniphest Tasks: T30263
Differential Revision: https://phabricator.mitk.org/D889