Giter Site home page Giter Site logo

tio-browse's Introduction

TIO Browse

TIO Browse is a viewer for exploring the structure of TyphonIO files.

TIO Browse is writen in C++ and uses the Qt library for the user interface. It naturally has a dependency on the TyphonIO library. The test suite is based on Google Test.

Building

CMake

TIO Browse use CMake to generate the build files.

Run CMake from the build directory, for example:

cmake -DQt5_enabled:BOOL=ON <source-dir>

The build accepts various options, the most important are summarised in the table below

Option Type Default Description
TyphonIO_ROOT PATH NA TyphonIO path
Qt4_enabled BOOL OFF Build Qt4 GUI
Qt5_enabled BOOL OFF Build Qt5 GUI
CMAKE_INSTALL_PREFIX PATH platform specific Install path
Documentation_enabled BOOL OFF Build documentation
GTEST_ROOT PATH NA Google Test path
Example_data_enabled BOOL OFF Build example files
Python_enabled BOOL ON Build with integrated python console

CMake example

Here is an example of how to run CMake:

export CXX=g++ CC=gcc
cmake \
    -DQt5_enabled:BOOL=ON \
    -DTyphonIO_ROOT:PATH=<path-to-TyphonIO> \
    -DHDF5_ROOT:PATH=<path-to-HDF5> \
    ../tio-browse

and here is an example with documentation and testing enabled:

export CXX=g++ CC=gcc
cmake \
    -DQt5_enabled:BOOL=ON \
    -DTyphonIO_ROOT:PATH=<path-to-TyphonIO> \
    -DHDF5_ROOT:PATH=<path-to-HDF5> \
    -DDocumentation_enabled:BOOL=ON \
    -DExample_data_enabled:BOOL=ON \
    -DTesting_enabled:BOOL=ON \
    -DGTEST_ROOT:PATH=<path-to-GTest> \
    ../tio-browse

Build

Build using CMake:

cmake --build .

Build documentation

To build the documentation, use the docs CMake target:

cmake --build . --target docs

Installation

To install the app, use the install CMake target:

cmake --build . --target install

The install directory can be set with the CMAKE_INSTALL_PREFIX option to CMake during the CMake project generation step.

Build options

The test suite makes use of the Google Test framework. To build the test suite, it is necessary to build TIO Browse with the Testing_enabled option set to ON.

The tests can be run using ctest:

ctest --output-on-failure

Alternatively, the test_runner app can be run directly from the <build-dir>/test directory:

./test_runner

The test_runner app accepts Google Test options, for example ot output a junit-compatible xml file:

.test_runner --gtest_output=xml

Python Console Example

Here is an example of how to used the integrated python console (assummed that you opened a file in tio-browse and used "Send to Console" buttom to send array to python):

# Use help() to see helper functions
>>>help()
# Use dir() to see all attributes and methods in the global namespace
>>>dir()
# You should be able to see the name of your array in list output

# An example on how to quickly plot an array in python
>>>import matplotlib.pyplot as plt
>>>plt.plot(<data>) # where you replace <data> with the name of your array
>>>plt.show()

tio-browse's People

Contributors

t-cann avatar benjaminjeliot avatar

tio-browse's Issues

Use CMake 'ExternalProject _Add'

Jim's comments

include (External Project)

ExternalProject_Add(
...
)

And then add source files to your target using something like:

${PROJECT_BINARY_DIR}/...

Remove Commented Code

Remove any commented out crufty code ( only the bits that you have modified).

  • Also in the CMake Files

Use Clang-format on changed tio-browse code

Run clang-format on the tio-browse code (only the files that you have modified)

  • These are my two most-common approaches
  • Save formatted source file in to a temporary file and then use kompare to review changes. clang-format ${f} > temp.txt ; cmp temp.txt ${f} || kompare temp.txt ${f}
  • Format in place and then review all my git changes. clang-format -i ${f}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.