36 #include "FibreWriter.hpp" 37 #include "Version.hpp" 39 template<
unsigned DIM>
41 const std::string& rBaseName,
42 const bool clearOutputDir)
43 : mBaseName(rBaseName),
49 template<
unsigned DIM>
55 template<
unsigned DIM>
62 for (
unsigned i=0; i<fibres.size();i++ )
66 p_axi_file->write((
char*)&fibres[i][0], DIM*
sizeof(
double));
70 for (
unsigned j=0; j<DIM; j++)
72 *p_axi_file << fibres[i][j] <<
"\t";
81 template<
unsigned DIM>
83 const std::vector< c_vector<double, DIM> >& second,
84 const std::vector< c_vector<double, DIM> >& third)
86 assert(fibres.size() == second.size());
87 assert(second.size() == third.size());
92 for (
unsigned i=0; i<fibres.size();i++ )
97 p_file->write((
char*)&fibres[i][0], DIM*
sizeof(
double));
98 p_file->write((
char*)&second[i][0], DIM*
sizeof(
double));
99 p_file->write((
char*)&third[i][0], DIM*
sizeof(
double));
104 for (
unsigned j=0; j<DIM; j++)
106 *p_file << fibres[i][j] <<
"\t";
108 for (
unsigned j=0; j<DIM; j++)
110 *p_file << second[i][j] <<
"\t";
112 for (
unsigned j=0; j<DIM; j++)
114 *p_file << third[i][j] <<
"\t";
123 template<
unsigned DIM>
129 *p_fibre_file << numItems;
133 *p_fibre_file <<
"\tBIN\n";
137 *p_fibre_file <<
"\n";
142 template<
unsigned DIM>
void WriteAllAxi(const std::vector< c_vector< double, DIM > > &fibres)
OutputFileHandler * mpOutputFileHandler
void SetWriteFileAsBinary()
out_stream OpenFileAndWriteHeader(const std::string &rFileName, unsigned numItems)
out_stream OpenOutputFile(const std::string &rFileName, std::ios_base::openmode mode=std::ios::out|std::ios::trunc) const
FibreWriter(const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true)
static std::string GetProvenanceString()
void WriteAllOrtho(const std::vector< c_vector< double, DIM > > &fibres, const std::vector< c_vector< double, DIM > > &second, const std::vector< c_vector< double, DIM > > &third)