From e22bda30817c19a1ffcaa5b9b32b1c561735b7e0 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Wed, 29 Jan 2025 17:27:24 +0000
Subject: [PATCH] BF: Use volume extrapolation getters rather than fields, as
 the fields won't have been initialised on ShadowVolume instances, whereas the
 getters will delegate to the owning volume

---
 newimage.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/newimage.h b/newimage.h
index f2a2707..906b402 100644
--- a/newimage.h
+++ b/newimage.h
@@ -207,26 +207,26 @@ int readGeneralVolume(volume<T>& target, const std::string& filename,
 
     public:
       extrapolation method(const volume<T>& vol) const {
-        if (_use_default_method) return vol.p_extrapmethod;
+        if (_use_default_method) return vol.getextrapolationmethod();
         else                     return _method;
       }
       T padvalue(const volume<T>& vol) const {
-        if (_use_default_padvalue) return vol.padvalue;
+        if (_use_default_padvalue) return vol.getpadvalue();
         else                       return _padvalue;
       }
       T& extrapval() const {
         return _extrapval;
       }
       bool xvalid(const volume<T>& vol) const {
-        if (_use_default_validity) return std::get<0>(vol.ep_valid);
+        if (_use_default_validity) return vol.getextrapolationvalidity()[0];
         else                       return _xvalid;
       }
       bool yvalid(const volume<T>& vol) const {
-        if (_use_default_validity) return std::get<1>(vol.ep_valid);
+        if (_use_default_validity) return vol.getextrapolationvalidity()[1];
         else                       return _yvalid;
       }
       bool zvalid(const volume<T>& vol) const {
-        if (_use_default_validity) return std::get<2>(vol.ep_valid);
+        if (_use_default_validity) return vol.getextrapolationvalidity()[2];
         else                       return _zvalid;
       }
 
-- 
GitLab