code: def to_volume(self):
          
          if hasattr(self.header.definitions, "Lattice"):
              X, Y, Z = self.header.definitions.Lattice
          else:
              raise ValueError("Unable to determine data size")
          
          volume = self.decoded_data.reshape(Z, Y, X)
          return volume
docs: Return a 3D volume of the data