volmetrics
annotate 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 |
rev | line source |
---|---|
elene@4 | 1 #include <stdio.h> |
elene@4 | 2 |
elene@3 | 3 #include "volume.h" |
elene@4 | 4 |
elene@4 | 5 Volume::Volume() |
elene@4 | 6 { |
elene@4 | 7 width = height = 0; |
elene@4 | 8 } |
elene@4 | 9 |
elene@4 | 10 bool Volume::load_volume(const char *fname) |
elene@4 | 11 { |
elene@4 | 12 return true; |
elene@4 | 13 } |
elene@4 | 14 |
elene@4 | 15 bool Volume::push_slice(Image &&slice) |
elene@4 | 16 { |
elene@4 | 17 if(slices.empty()) { |
elene@4 | 18 width = slice.get_width(); |
elene@4 | 19 height = slice.get_height(); |
elene@4 | 20 } |
elene@4 | 21 else { |
elene@4 | 22 if(width != slice.get_width() || height != slice.get_height()) { |
elene@4 | 23 fprintf(stderr, "failed to load slice no: %d\n", (int)slices.size() + 1); |
elene@4 | 24 return false; |
elene@4 | 25 } |
elene@4 | 26 } |
elene@4 | 27 |
elene@4 | 28 slices.push_back(slice); |
elene@4 | 29 return true; |
elene@4 | 30 } |