Skip to content
Snippets Groups Projects
Commit 4260ce68 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: Revert volume.initialize visibility back to protected. No need to be

public, but can't be private, as ShadowVolume calls it.
parent 6fb1ecc2
No related branches found
No related tags found
1 merge request!42RF: Improve thread-safety of `NEWIMAGE::volume` class
Pipeline #26721 passed
...@@ -278,7 +278,22 @@ int readGeneralVolume(volume<T>& target, const std::string& filename, ...@@ -278,7 +278,22 @@ int readGeneralVolume(volume<T>& target, const std::string& filename,
_use_default_validity(false) {} _use_default_validity(false) {}
}; };
private: // initialize can be called from the ShadowVolume
// class, hence has protected visibility
protected:
virtual int initialize(
int64_t xsize, int64_t ysize, int64_t zsize,
int64_t tsize, int64_t d5, int64_t d6, int64_t d7,
T *d, bool d_owner, int64_t nthreads); //Master 7D
private:
int initialize(
int64_t xsize, int64_t ysize, int64_t zsize,
T *d, bool d_owner, int64_t nthreads); //3D
int initialize(
int64_t xsize, int64_t ysize, int64_t zsize,
int64_t tsize, T *d, bool d_owner, int64_t nthreads); //4D
// Internal functions // Internal functions
inline T* basicptr(int64_t x, int64_t y, int64_t z) { inline T* basicptr(int64_t x, int64_t y, int64_t z) {
...@@ -287,10 +302,6 @@ int readGeneralVolume(volume<T>& target, const std::string& filename, ...@@ -287,10 +302,6 @@ int readGeneralVolume(volume<T>& target, const std::string& filename,
inline T* basicptr(int64_t x, int64_t y, int64_t z) const inline T* basicptr(int64_t x, int64_t y, int64_t z) const
{ return (Data + (z*RowsY + y)*ColumnsX + x); } { return (Data + (z*RowsY + y)*ColumnsX + x); }
int initialize(int64_t xsize, int64_t ysize, int64_t zsize, T *d, bool d_owner, int64_t nthreads); //3D
int initialize(int64_t xsize, int64_t ysize, int64_t zsize, int64_t tsize, T *d, bool d_owner, int64_t nthreads); //4D
virtual int initialize(int64_t xsize, int64_t ysize, int64_t zsize, int64_t tsize, int64_t d5, int64_t d6, int64_t d7, T *d, bool d_owner, int64_t nthreads); //Master 7D
void setdefaultproperties(); void setdefaultproperties();
void enforcelimits(std::vector<int>& lims) const; void enforcelimits(std::vector<int>& lims) const;
...@@ -808,6 +819,12 @@ private: ...@@ -808,6 +819,12 @@ private:
const volume<T>& owner() const; const volume<T>& owner() const;
protected:
virtual int initialize(
int64_t xsize, int64_t ysize, int64_t zsize,
int64_t tsize, int64_t d5, int64_t d6, int64_t d7,
T *d, bool d_owner, int64_t nt);
public: public:
using volume<T>::operator=; using volume<T>::operator=;
...@@ -842,8 +859,6 @@ public: ...@@ -842,8 +859,6 @@ public:
[[deprecated("Calling setsplineorder on a ShadowVolume will result in runtime errors!")]] [[deprecated("Calling setsplineorder on a ShadowVolume will result in runtime errors!")]]
virtual void setsplineorder(int order); virtual void setsplineorder(int order);
virtual int initialize(int64_t xsize, int64_t ysize, int64_t zsize, int64_t tsize, int64_t d5, int64_t d6, int64_t d7, T *d, bool d_owner, int64_t nt);
const volume<T>& equals(const volume<T>& source); const volume<T>& equals(const volume<T>& source);
ShadowVolume(); ShadowVolume();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment