fix compile errors for osx

This commit is contained in:
Emil Axelsson
2016-05-20 00:39:29 +02:00
parent 7b525d1b29
commit ca46661d3e
5 changed files with 3 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ public:
glm::ivec3 dimensions() const;
void setDimensions(const glm::ivec3& dimensions);
void write(const std::function<VoxelType(const glm::ivec3&)>& fn,
const std::function<void(float t)>& onProgress = [&](float t) {});
const std::function<void(float t)>& onProgress = [](float t) {});
void write(const RawVolume<VoxelType>& volume);
size_t coordsToIndex(const glm::ivec3& coords) const;

View File

@@ -63,7 +63,7 @@ void RawVolumeWriter<VoxelType>::write(const std::function<VoxelType(const glm::
template <typename VoxelType>
void RawVolumeWriter<VoxelType>::write(const RawVolume<VoxelType>& volume) {
glm::ivec3 dims = dimensions();
ghoul_assert(dims == volume.dims());
ghoul_assert(dims == volume.dims(), "Dimensions of input and output volume must agree");
const char* buffer = reinterpret_cast<char*>(volume.data());
size_t length = static_cast<size_t>(dims.x) *

View File

@@ -18,7 +18,6 @@ public:
VoxelType get(const glm::ivec3& coordinates) const;
virtual glm::ivec3 dimensions() const;
void setPaths(const std::vector<std::string> paths);
void setCacheSize(size_t size);
void initialize();
private:
ghoul::opengl::Texture& getSlice(int sliceIndex) const;

View File

@@ -38,11 +38,6 @@ void TextureSliceVolumeReader<VoxelType>::setPaths(const std::vector<std::string
_paths = paths;
}
template <typename VoxelType>
void TextureSliceVolumeReader<VoxelType>::setCacheSize(size_t sliceCacheSize) {
_cache.resize(sliceCacheSize);
}
template <typename VoxelType>
ghoul::opengl::Texture& TextureSliceVolumeReader<VoxelType>::getSlice(int sliceIndex) const {
ghoul_assert(_initialized, "Volume is not initialized");

View File

@@ -20,7 +20,7 @@ typename VolumeType::VoxelType VolumeSampler<VolumeType>::sample(const glm::vec3
glm::ivec3 maxCoords = minCoords + _filterSize; // max coords to sample from, including interpolation.
glm::ivec3 clampCeiling = _volume->dimensions() - glm::ivec3(1);
VolumeType::VoxelType value;
typename VolumeType::VoxelType value;
for (int z = minCoords.z; z <= maxCoords.z; z++) {
for (int y = minCoords.y; y <= maxCoords.y; y++) {
for (int x = minCoords.x; x <= maxCoords.x; x++) {