17#ifndef __dwi_tractography_editing_receiver_h__
18#define __dwi_tractography_editing_receiver_h__
33 namespace Tractography {
44 Receiver (
const std::string& path,
const Properties& properties,
const size_t n,
const size_t s) :
45 writer (path, properties),
51 crop (properties.mask.size()),
53 progress (std::string(
" 0 read, 0 written") + (crop ?
", 0 segments" :
"")) { }
58 progress.
set_text (std::string(
printf (
"%8" PRIu64
" read, %8" PRIu64
" written", total_count, count)) + (crop ?
printf(
", %8" PRIu64
" segments", segments) :
""));
59 if (number && (count != number))
60 WARN (
"User requested " +
str(number) +
" streamlines, but only " +
str(count) +
" were written to file");
70 const uint64_t number;
72 uint64_t count, total_count;
class to handle writing tracks to file, with RAM buffer
implements a progress meter to provide feedback to the user
void set_text(const std::string &new_text)
std::string str(const T &value, int precision=0)
std::string printf(const char *format,...)