Add GenericLoader to load events from file. #81
Conversation
apps/commandLineApplication.h
Outdated
@@ -58,6 +58,7 @@ std::istream& operator >> ( std::istream& is, Vector2ui& vec ) | |||
|
|||
namespace | |||
{ | |||
typedef fivox::FloatVolume::Pointer VolumePtr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed?
apps/computeVSD/computeVSD.cpp
Outdated
@@ -328,7 +328,8 @@ class ComputeVSD : public CommandLineApplication | |||
|
|||
file << "VSDPositionFile=" << _outputFile + ".psp" << std::endl; | |||
file << "VSDIntensityFile=" << filename + ".psi" << std::endl; | |||
file << "TimeStep=" << _eventSource->getDt() << std::endl; | |||
file << "TimeStep=" << _eventSource->getCurrentTime() << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really?
doc/Changelog.md
Outdated
@@ -3,6 +3,9 @@ Changelog {#changelog} | |||
|
|||
# git master {#master} | |||
|
|||
* [#!!](https://github.com/BlueBrain/Fivox/pull/!!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
81
fivox/eventSource.cpp
Outdated
@@ -90,6 +109,65 @@ class EventSource::Impl | |||
events.reset((float*) ptr ); | |||
} | |||
|
|||
bool isBinary( const lunchbox::MemoryMap& binaryFile ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const function
fivox/eventSource.cpp
Outdated
if( _impl->isBinary( binaryFile )) | ||
return _impl->readBinary( binaryFile, filename ); | ||
|
||
std::string line; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to _impl->readAscii()
fivox/genericLoader.cpp
Outdated
{ | ||
return Vector2f( 0.f, 100.f ); | ||
} | ||
|
||
ssize_t TestLoader::_load( const size_t /*chunkIndex*/, | ||
ssize_t GenericLoader::_load( const size_t /*chunkIndex*/, | ||
const size_t /*numChunks*/ ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
97f4200
to
3071ab5
Compare
Added read and write methods in the EventSource, to save/load events to/from binary or ASCII files. Use "fivox://" for the GenericLoader ("fivoxcompartments://" for the CompartmentLoader) Replace TestLoader with new GenericLoader, behaving the same way as previously when no events file is specified.
Added read and write methods in the EventSource, to
save/load events to/from binary or ASCII files.
Use "fivox://" for the GenericLoader ("fivoxcompartments://"
for the CompartmentLoader)
Replace TestLoader with new GenericLoader, behaving the same way
as previously when no events file is specified.