1 #include <visp3/ustk_core/usMHDSequenceReader.h>
3 #include <visp3/ustk_core/usMHDSequenceWriter.h>
4 int main(
int argc,
char **argv)
6 std::string sequenceDirectory;
8 std::cout <<
"\nUsage: " << argv[0] <<
" [--input /path/to/mhd/sequence ] \n" << std::endl;
12 for (
unsigned int i = 1; i < (
unsigned int)argc; i++) {
13 if (std::string(argv[i]) ==
"--input") {
14 sequenceDirectory = std::string(argv[i + 1]);
17 std::cout <<
"\nUsage: " << argv[0] <<
" [--input /path/to/mhd/sequence ] \n" << std::endl;
23 std::vector<uint64_t> timestamp;
31 uint64_t newTimestamp = 0;
34 while (!reader.
end()) {
35 reader.
acquire(image, timestamp);
41 for (
unsigned int i = 0; i < timestamp.size(); i++) {
42 timestamp.at(i) = newTimestamp;
47 std::reverse(timestamp.begin(), timestamp.end());
49 writer.
write(image, timestamp);
Reader for a sequence of images stored as mhd/raw files in a directory Image sequence files order hav...
void acquire(usImageRF2D< short int > &image, uint64_t ×tamp)
void setSequenceDirectory(const std::string sequenceDirectory)
Writer for a sequence of images stored as mhd/raw files in a directory Image filenames are set based ...
void setSequenceDirectory(const std::string sequenceDirectory)
void write(const usImageRF2D< short int > &image, const uint64_t timestamp)