From 562e173f732bb141b540ce2d8e674f8e57662513 Mon Sep 17 00:00:00 2001
From: Christian Kento Rasmussen <christian.kento@gmail.com>
Date: Wed, 24 Jan 2024 14:26:00 +0100
Subject: [PATCH] Fix path correction for .vgi metadata file

---
 qim3d/io/load.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/qim3d/io/load.py b/qim3d/io/load.py
index 580a724e..eefd8038 100644
--- a/qim3d/io/load.py
+++ b/qim3d/io/load.py
@@ -342,11 +342,15 @@ class DataLoader:
 
         Args:
             path (str): The path to the VGI file.
+        
+        returns:
+            numpy.ndarray or tuple: The loaded volume.
+                If 'self.return_metadata' is True, returns a tuple (volume, metadata).
         """ 
         # makes sure path point to .VGI metadata file and not the .VOL file
         if path.endswith(".vol") and os.path.isfile(path.replace(".vol",".vgi")):
             path = path.replace(".vol",".vgi")
-            print("WARNING: Corrected path to .vgi metadata file from .vol file")
+            log.warning("Corrected path to .vgi metadata file from .vol file")
 
         meta_data = self._load_vgi_metadata(path)
 
-- 
GitLab