volmetrics

view src/volume.cc @ 4:1fbbe10c8e08

quick backup
author Eleni Maria Stea <elene.mst@gmail.com>
date Sat, 11 Jan 2014 23:49:58 +0200
parents 927c29b93009
children 92c163c939be
line source
1 #include <stdio.h>
3 #include "volume.h"
5 Volume::Volume()
6 {
7 width = height = 0;
8 }
10 bool Volume::load_volume(const char *fname)
11 {
12 return true;
13 }
15 bool Volume::push_slice(Image &&slice)
16 {
17 if(slices.empty()) {
18 width = slice.get_width();
19 height = slice.get_height();
20 }
21 else {
22 if(width != slice.get_width() || height != slice.get_height()) {
23 fprintf(stderr, "failed to load slice no: %d\n", (int)slices.size() + 1);
24 return false;
25 }
26 }
28 slices.push_back(slice);
29 return true;
30 }