Skip to content

Commit

Permalink
Modified readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Arttu Miettinen committed Nov 23, 2018
1 parent f5f7c38 commit 0838408
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions README.md
Expand Up @@ -12,7 +12,7 @@ Pi2 is not intended to be a replacement for huge libraries like ITK and VTK. Ins

## Binaries

Pre-built binaries for Windows and CentOS Linux can be downloaded from the releases page.
Pre-built binaries for Windows and CentOS Linux can be downloaded from the releases page. The linux binaries probably work on other Linux distributions, too, as long as library versions match.


## Examples
Expand All @@ -22,9 +22,9 @@ Examples including small test datasets can be downloaded along with binaries, se

## Getting help

It's best to start from examples, but there is also some help built-in to the pi2 program and in the Python bindings.
The program should be relatively easy to use if you are familiar with command line tools or Python. It's best to start from examples (see above), but there is also some help built-in to the pi2 program and in the Python bindings.

For raw pi2: Open command line or terminal and run `pi2 help` to get a list of commands.
For raw pi2: Open command line or terminal and run `pi2` or `pi2 help` to get a list of commands.

From Python:
```
Expand All @@ -34,24 +34,13 @@ pi2.help()
```



## Design decisions

- Simplicity: Everything must be as simple and understandable as possible. Therefore, "C with classes" approach is mostly used. Every operation is preferably a simple function call. Only a minimal number of stateful objects is used.
- Performance: All algorithms should be as performant as possible and parallelized. OpenMP has been chosen as threading library. Code should be written such that automatic SIMD compilation is easy. For the original author this point is easier to ensure if iteration is explicit and not hidden inside iterator objects. Therefore, iteration is made using explicit loops.
- When there are multiple possibilities, the library should automatically choose the most performant algorithm.
- Implementation must be as readable as possible even for inexperienced C++ developers.
- Algorithms are designed for 2D and 3D images unless nD implementation is simpler than implementation bound to specific image dimensions. Complexity is never increased by adding nD implementation.
- Complex operations are not hidden inside operator overloads. If a calculation might take long time for a big image, it should be initiated using a function call.



## Building

### Linux

- Make sure that FFTW 3 library is installed (or place its source to fftw-3.3.7-src folder, modify paths in build_again.sh to point to correct folders and run it).
- Make sure that libpng library is installed.
- Make sure that g++ 7.3 is installed.
- For Python support make sure that Python 3 is installed.
- Run make in the project root directory. The output is placed in folder bin-linux64/release.

Expand All @@ -64,9 +53,25 @@ You can install the executable and libraries to any standard location, but often
- Build everything in itl2.sln solution file using Visual Studio. The output is placed to x64/Release folder.



## License

This software is licensed under [GNU General Public License v3.0.](LICENSE.txt)

Some external parts of the software (that might be statically or dynamically linked depending on configuration) are licensed under their respective licenses. At least libpng, zlib, and FFTW 3 are used. Some code from third parties licensed separately is also used. Please run `pi2 license` for most up-to-date information.


## Design decisions & some reasoning why things are done as they are

- Simplicity: Everything must be as simple and understandable as possible. Therefore, "C with classes" approach is mostly used. Every operation is preferably a simple function call. Only a minimal number of stateful objects is used.
- Performance: All algorithms should be as performant as possible and parallelized. OpenMP has been chosen as threading library. Code should be written such that automatic SIMD compilation is easy. For the original author this point is easier to ensure if iteration is explicit and not hidden inside iterator objects. Therefore, iteration is made using explicit loops.
- When there are multiple possibilities, the library should automatically choose the most performant algorithm.
- Implementation must be as readable as possible even for inexperienced developers.
- Algorithms are designed for 2D and 3D images unless nD implementation is simpler than implementation bound to specific image dimensions. Complexity is never increased by adding nD implementation.
- Complex operations are not hidden inside operator overloads. If a calculation might take long time for a big image, it should be initiated using a function call.


## Contact

Problems or questions? Contact arttu.miettinen@psi.ch.

0 comments on commit 0838408

Please sign in to comment.