Issue warning if SimpleITK is not importable
@@ -13,7 +13,8 @@ try:
import utilities.simple_itk_as_nibabel
image_loaders.append(utilities.simple_itk_as_nibabel.SimpleITKAsNibabel)
except ImportError:
- raise ImportWarning('SimpleITK adapter failed to load, reducing the supported file formats.')
+ warnings.warn('SimpleITK adapter failed to load, reducing the supported file formats.',ImportWarning)
+
warnings.simplefilter("ignore", UserWarning)
