Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data.Frame event #38

Merged
merged 1 commit into from
Mar 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

# git master

* [35](https://github.com/HBPVIS/ZeroBuf/pull/35)
Added LookOut and Frame events
* [38](https://github.com/HBPVIS/ZeroBuf/pull/38):
Add data.Frame event
* [35](https://github.com/HBPVIS/ZeroBuf/pull/35):
Add LookOut and render.Frame events

# Release 0.2 (08-03-2016)

* [32](https://github.com/HBPVIS/ZeroBuf/pull/32)
Added JSON conversion to code generator
* [30](https://github.com/HBPVIS/ZeroBuf/pull/30)
Added ImageJPEG event
* [32](https://github.com/HBPVIS/ZeroBuf/pull/32):
Add JSON conversion to code generator
* [30](https://github.com/HBPVIS/ZeroBuf/pull/30):
Add ImageJPEG event

# Release 0.1 (28-01-2016)

Expand Down
1 change: 1 addition & 0 deletions zerobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ set(ZEROBUF_OMIT_LIBRARY_HEADER ON)
common_library(ZeroBuf)
target_compile_definitions(ZeroBuf PRIVATE ZEROBUF_SHARED_INL)

add_subdirectory(data)
add_subdirectory(render)
14 changes: 14 additions & 0 deletions zerobuf/data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) HBP 2016 Jafet Villafranca <jafet.villafrancadiaz@epfl.ch>

set(ZEROBUFDATA_INCLUDE_NAME zerobuf/data)

include(zerobufGenerateCxx)
zerobuf_generate_cxx(ZEROBUFDATA
${OUTPUT_INCLUDE_DIR}/${ZEROBUFDATA_INCLUDE_NAME} frame.fbs)

set(ZEROBUFDATA_PUBLIC_HEADERS ${ZEROBUFDATA_HEADERS})
set(ZEROBUFDATA_LINK_LIBRARIES PUBLIC ZeroBuf)

set(ZEROBUFDATA_INCLUDE_NAME zerobuf/data)
set(ZEROBUFDATA_NAMESPACE zerobufdata)
common_library(ZeroBufData)
19 changes: 19 additions & 0 deletions zerobuf/data/frame.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) 2016, Human Brain Project
// Jafet.VillafrancaDiaz@epfl.ch
//
namespace zerobuf.data;

// Event containing the data frame range information. It is based on the same
// units as the zerobuf.render.Frame, i.e. number of frames.
// It may be used as a base event that defines the available range of frames
// coming from a certain data source, being also possible to use the
// zerobuf.render.Frame event at the same time, which would define the frame
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all could have been handled in the GUI, why did we add a new event ?
The GUI is the one who commands a frame ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GUI only knows what it receives from Livre, which at the moment is the render.Frame event (start, current, end, delta). Now, Livre and the GUI are using this interval of frames to loop between them in an animation, and this range can also be modified from the GUI, being possible to focus on a specific segment of the visualization.
This new data.Frame event is adding semantics for the range of frames that the data source provides, so we can easily know the available range from the GUI, but at the same time change the range within which the rendering should animate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We ( @favreau and I ) had this conclusion 6 months ago and it was rejected :) Anyways good to have it.

// subrange used by a rendering animation to loop within.

table Frame
{
// starting frame number in the data frame range
start:uint;
// end frame number in the data frame range
end:uint;
}