You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way to use it is configure it via some new APR_* variables (can be set to ON/OFF depending on needs) which describes what to build and if it should be installed through cmake commands:
3
+
The build is configured it via several CMake options (APR_* variables), which can be set to ON/OFF depending on your needs.
4
+
The following options control the build type and installation:
4
5
5
-
APR_BUILD_STATIC_LIB=ON
6
-
APR_BUILD_SHARED_LIB=OFF
7
-
APR_INSTALL=ON
8
-
(all other configuration possibilities are now in the top of CMakeLists.txt file)
6
+
- APR_BUILD_STATIC_LIB=ON
7
+
- APR_BUILD_SHARED_LIB=OFF
8
+
- APR_INSTALL=ON
9
+
10
+
See [README](README.md) for the full list of build options.
9
11
10
12
## OSX / UNIX Installation
11
13
12
-
so full commandline would look like: (-DCMAKE_INSTALL_PREFIX=/tmp/APR can be used for a non-default location)
14
+
The full command-line to install the library may look like:
You may need file-permissions (sudo for the install)
23
+
with other build options turned on/off as required. Non-default install locations can be set via
24
+
`-DCMAKE_INSTALL_PREFIX=/tmp/APR`. Depending on the location, you may need file-permissions (sudo) for the install command.
23
25
24
26
## Windows Installation Clang
25
27
26
-
``
28
+
On Windows the install commands may look like:
29
+
30
+
```
27
31
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE="PATH_TO_VCPKG\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -T ClangCL -DAPR_BUILD_STATIC_LIB=ON -DAPR_BUILD_SHARED_LIB=OFF -DAPR_INSTALL=ON ..
28
32
cmake --build . --config Release
29
-
``
30
-
31
-
Need to be in a console running as administrator.
32
-
33
-
``
34
33
cmake --install .
35
-
``
34
+
```
36
35
37
-
## Minimal example CMAKE
36
+
(Probably need to be in a console running as administrator)
38
37
39
-
To use APR the minimalistic CMakeLists.txt file can be found here: https://github.com/AdaptiveParticles/APR_cpp_project_example
38
+
## Minimal CMake example
40
39
41
-
##
40
+
A minimalistic CMakeLists.txt file for using LibAPR in another C++ project can be found here: https://github.com/AdaptiveParticles/APR_cpp_project_example
42
41
43
-
APR::staticLib (Note, tested across Windows, Linux, and Mac)
44
-
APR::sharedLib (Note, not tested)
42
+
### Notes:
45
43
46
-
If shared version is preferred then APR::sharedLib should be used (and of course APR_BUILD_SHARED_LIB=ON during lib build step).
44
+
If shared version is preferred then `APR::sharedLib` should be used (and of course APR_BUILD_SHARED_LIB=ON during the build step).
47
45
48
-
NOTICE: if APR is installed in not standard directory then some hint for cmake must be provided by adding install dir to CMAKE_PREFIX_PATH like for above example:
46
+
Use of `APR::staticLib` has been tested across Windows, Linux, and Mac.
47
+
`APR::sharedLib` has currently only been tested on Linux.
49
48
49
+
If APR is installed in a non-standard location then some hint for cmake must be provided by adding the install directory
We now provide python wrappers in a separate repository [PyLibAPR](https://github.com/AdaptiveParticles/PyLibAPR)
15
+
We provide python wrappers in a separate repository [pyapr](https://github.com/AdaptiveParticles/pyapr). This is likely
16
+
the simplest option to first try and use the APR.
16
17
17
-
In addition to providing wrappers for most of the LibAPR functionality, the Python library contains a number of new features that simplify the generation and handling of the APR. For example:
18
+
In addition to providing wrappers for most of the LibAPR functionality, the Python library contains a number of new
19
+
features that simplify the generation and handling of the APR. For example:
On Ubuntu, install the `cmake`, `build-essential`, `libhdf5-dev` and `libtiff5-dev` packages (on other distributions, refer to the documentation there, the package names will be similar). OpenMP support is provided by the GCC compiler installed as part of the `build-essential` package.
69
+
On Ubuntu, install the `cmake`, `build-essential`, `libhdf5-dev` and `libtiff5-dev` packages (on other distributions,
70
+
refer to the documentation there, the package names will be similar). OpenMP support is provided by the GCC compiler
71
+
installed as part of the `build-essential` package.
84
72
85
-
For denoising support also requires:`libeigen3-dev`
73
+
Denoising support also requires `libeigen3-dev`.
86
74
87
-
In the directory of the cloned repository, run
75
+
In the directory of the cloned repository, run:
88
76
89
77
```
90
78
mkdir build
@@ -97,9 +85,11 @@ This will create the `libapr.so` library in the `build` directory.
97
85
98
86
### Building on OSX
99
87
100
-
On OSX, install the `cmake`, `hdf5` and `libtiff`[homebrew](https://brew.sh) packages and have the [Xcode command line tools](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/) installed.
88
+
On OSX, install the `cmake`, `hdf5` and `libtiff`[homebrew](https://brew.sh) packages and have the
89
+
[Xcode command line tools](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/) installed.
101
90
102
-
If you want to compile with OpenMP support (Recommended), also install the `llvm` and `libomp` package via homebrew as the clang version shipped by Apple currently does not support OpenMP.
91
+
If you want to compile with OpenMP support (Recommended), also install the `llvm` and `libomp` package via homebrew as
92
+
the clang version shipped by Apple currently does not support OpenMP.
103
93
104
94
In the directory of the cloned repository, run
105
95
@@ -160,11 +150,11 @@ Note: not recently tested.
160
150
161
151
## Install instructions
162
152
163
-
Please see: INSTALL_INSTRUCTIONS.md and https://github.com/AdaptiveParticles/APR_cpp_project_example for a minimal project using the APR.
153
+
Please see[INSTALL_INSTRUCTIONS](INSTALL_INSTRUCTIONS.md) and https://github.com/AdaptiveParticles/APR_cpp_project_example for a minimal project using the APR.
164
154
165
155
## Examples and Documentation
166
156
167
-
There are 12 basic examples, that show how to generate and compute with the APR. These can be built by adding
157
+
There are 14 basic examples, that show how to generate and compute with the APR. These can be built by adding
168
158
-DAPR_BUILD_EXAMPLES=ON to the cmake command.
169
159
170
160
| Example | How to ... |
@@ -181,10 +171,13 @@ There are 12 basic examples, that show how to generate and compute with the APR.
181
171
|[Example_compute_gradient](./examples/Example_compute_gradient.cpp)| compute the gradient magnitude of an APR. |
182
172
|[Example_apr_filter](./examples/Example_apr_filter.cpp)| apply a filter (convolution) to an APR. |
183
173
|[Example_apr_deconvolution](./examples/Example_apr_deconvolution.cpp)| perform Richardson-Lucy deconvolution on an APR. |
174
+
|[Exampe_denoise](./examples/Example_denoise.cpp)| denoise an APR (experimental) |
175
+
|[Example_lazy_access](./examples/Example_lazy_access.cpp)| lazily iterate over APR particles and their spatial properties |
184
176
185
177
All examples except `Example_get_apr` and `Example_get_apr_by_block` require an already produced APR, such as those created by `Example_get_apr*`.
186
178
187
-
For tutorial on how to use the examples, and explanation of data-structures see [the library guide](./docs/lib_guide.pdf).
179
+
For tutorial on how to use the examples, and explanation of data-structures see [the library guide](./docs/lib_guide.pdf)
180
+
(note: this is outdated - in particular code examples may not work and some discussed parameters do not exist anymore).
188
181
189
182
## LibAPR Tests
190
183
@@ -196,7 +189,9 @@ on the command line in your build folder. Please let us know by creating an issu
196
189
197
190
## Java wrappers
198
191
199
-
Basic Java wrappers can be found at [LibAPR-java-wrapper](https://github.com/krzysg/LibAPR-java-wrapper) Not compatable with recent releases.
192
+
Basic Java wrappers can be found at [LibAPR-java-wrapper](https://github.com/AdaptiveParticles/LibAPR-java-wrapper).
0 commit comments