class to handle unbuffered writing of tracks to file More...
#include "dwi/tractography/file.h"
Public Types | |
using | vector_type = Eigen::Matrix< ValueType, 3, 1 > |
Public Member Functions | |
WriterUnbuffered (const std::string &file, const Properties &properties) | |
create a new track file with the specified properties More... | |
bool | operator() (const Streamline< ValueType > &tck) |
append track to file More... | |
void | set_weights_path (const std::string &path) |
set the path to the track weights More... | |
Public Member Functions inherited from MR::DWI::Tractography::WriterInterface< float > | |
virtual bool | operator() (const Streamline< float > &)=0 |
virtual | ~WriterInterface () |
Protected Member Functions | |
vector_type | delimiter () const |
indicates end of track and start of new track More... | |
vector_type | barrier () const |
indicates end of data More... | |
void | format_point (const vector_type &src, vector_type &dest) |
perform per-point byte-swapping if required More... | |
void | write_weights (const std::string &contents) |
write track weights data to file More... | |
void | commit (vector_type *data, size_t num_points) |
write track point data to file More... | |
WriterUnbuffered (const WriterUnbuffered &)=delete | |
copy construction explicitly disabled More... | |
Protected Attributes | |
std::string | weights_name |
int64_t | barrier_addr |
class to handle unbuffered writing of tracks to file
writes track header as specified in properties and individual tracks to the file specified in file. Writing individual tracks is done using the operator() method.
This class re-opens the output file every time a new streamline is written. This may result in slow operation in some circumstances, and may lead to fragmentation on some file systems, but is necessary in use cases where a very large number of track files are being written at once. For most applications (where typically one track file is written at a time), the Writer class is more appropriate.
using MR::DWI::Tractography::WriterUnbuffered< ValueType >::vector_type = Eigen::Matrix<ValueType,3,1> |
|
inline |
|
protecteddelete |
copy construction explicitly disabled
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
|
protected |
|
protected |