23 #pragma clang diagnostic push 24 #pragma clang diagnostic ignored "-Wpadded" 39 using VoxelData = std::vector<ValueType>;
82 inline bool isEmpty() const noexcept {
return volumeSize_.
linear() == 0; }
109 noexcept(noexcept(f(
std::declval<VoxelData>().data()))) {
110 return f(voxelData_.data());
117 VoxelData voxelData_;
125 #pragma clang diagnostic pop Name namespace for CortidQCT library.
Definition: CortidQCT.h:23
VolumeSize const & size() const noexcept
Returns the volume size.
Definition: VoxelVolume.h:76
bool isEmpty() const noexcept
Returns true iff the volume is empty.
Definition: VoxelVolume.h:82
This header contains the definition of the VoxelSize type.
VoxelSize const & voxelSize() const noexcept
Returns the voxel size.
Definition: VoxelVolume.h:79
Definition: ColorToLabelMap.h:27
constexpr std::size_t linear() const noexcept
Returns the linear size (i.e. width * height * depth)
Definition: VolumeSize.h:79
Size type for a 3D voxel.
Definition: VolumeSize.h:22
Type representing a voxel volume.
Definition: VoxelVolume.h:32
VoxelVolume() noexcept
Constructs an empty volume.
Definition: VoxelVolume.h:46
Size type for a 3D voxel.
Definition: VoxelSize.h:22
VoxelVolume(std::string const &filename)
Definition: VoxelVolume.h:50
auto withUnsafeDataPointer(F &&f) const noexcept(noexcept(f(std::declval< VoxelData >().data())))
Calls the given functional with an unsafe pointer to the raw voxel storage.
Definition: VoxelVolume.h:108
float ValueType
Voxel value type.
Definition: VoxelVolume.h:35
This header contains the definition of the VolumeSize type.
VoxelVolume & loadFromFile(std::string const &filename)
Loads the volume data from file using format auto detection.
Definition: VoxelVolume.cpp:25