cgv
Loading...
Searching...
No Matches
sliced_volume.h
1#pragma once
2
3#include "volume.h"
4#include "volume_io.h"
5
6
7#include "../lib_begin.h"
8
9namespace cgv {
10 namespace media {
11 namespace volume {
12
16 struct CGV_API ooc_sliced_volume : public volume
17 {
18 public:
19 unsigned nr_slices;
20 unsigned offset;
21 std::string file_name_pattern;
22 public:
24 std::string get_slice_file_name(int i) const;
25 unsigned get_nr_slices() const;
27 dimension_type get_dimensions() const;
29 void resize(const dimension_type& S);
31 bool open_read(const std::string& file_name);
33 bool is_open() const;
34 bool read_slice(int i, const std::string& slice_file_name = "");
36 bool open_write(const std::string& file_name, const std::string& _file_name_pattern, unsigned nr_slices);
38 bool write_slice(int i) const;
39 void close();
40 };
41
42 struct CGV_API sliced_volume_info : public volume_info
43 {
44 std::string file_name_pattern;
45 int offset;
47 };
48
49 extern CGV_API bool read_sliced_header(const std::string& file_name, sliced_volume_info& info);
50
51 extern CGV_API bool write_sliced_header(const std::string& file_name, const ooc_sliced_volume& V);
52 }
53 }
54}
55
56#include <cgv/config/lib_end.h>
the cgv namespace
Definition print.h:11
the ooc_sliced_volume data structure allows random access to a volume that is stored as per slice fil...