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:
4
+
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)
if shared version is preferred then apr::sharedLib should be used (and of course APR_BUILD_SHARED_LIB=ON during lib build step).
39
+
40
+
NOTICE: if APR is isntalled in not standard directory then some hint for cmake must be provided by adding install dir to CMAKE_PREFIX_PATH like for above example:
We now provide python wrappers in a separate repository [PyLibAPR](https://github.com/AdaptiveParticles/PyLibAPR)
16
+
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:
If you need to update your clone at any point later, run
60
+
### CMake build options
33
61
62
+
Several CMake options can be given to control the build. Use the `-D` argument to set each
63
+
desired option. For example, to disable OpenMP, change the cmake calls below to
34
64
```
35
-
git pull
36
-
git submodule update
65
+
cmake -DAPR_USE_OPENMP=OFF ..
37
66
```
38
67
68
+
| Option | Description | Default value |
69
+
|:--|:--|:--|
70
+
| APR_BUILD_SHARED_LIB | Build shared library | ON |
71
+
| APR_BUILD_STATIC_LIB | Build static library | OFF |
72
+
| APR_BUILD_EXAMPLES | Build executable examples | OFF |
73
+
| APR_TESTS | Build unit tests | OFF |
74
+
| APR_BENCHMARK | Build executable performance benchmarks | OFF |
75
+
| APR_USE_LIBTIFF | Enable LibTIFF (Required for tests and examples) | ON |
76
+
| APR_PREFER_EXTERNAL_GTEST | Use installed gtest instead of included sources | OFF |
77
+
| APR_PREFER_EXTERNAL_BLOSC | Use installed blosc instead of included sources | OFF |
78
+
| APR_USE_OPENMP | Enable multithreading via OpenMP | ON |
79
+
| APR_USE_CUDA | Enable CUDA (Under development - APR conversion pipeline is currently not working with CUDA enabled) | OFF |
80
+
39
81
### Building on Linux
40
82
41
83
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.
@@ -51,11 +93,7 @@ cmake ..
51
93
make
52
94
```
53
95
54
-
This will create the `libapr.so` library in the `build` directory, as well as all of the examples.
55
-
56
-
### Docker build
57
-
58
-
We provide a working Dockerfile that install the library within the image on a separate [repo](https://github.com/MSusik/libaprdocker).
96
+
This will create the `libapr.so` library in the `build` directory.
59
97
60
98
### Building on OSX
61
99
@@ -72,7 +110,8 @@ cmake ..
72
110
make
73
111
```
74
112
75
-
This will create the `libapr.dylib` library in the `build` directory, as well as all of the examples.
113
+
This will create the `libapr.dylib` library in the `build` directory.
114
+
76
115
77
116
In case you want to use the homebrew-installed clang (OpenMP support), modify the call to `cmake` above to
This will set the appropriate hints for Visual Studio to find both LibTIFF and HDF5. This will create the `apr.dll` library in the `build/Debug` directory, as well as all of the examples. If you need a `Release` build, run `cmake --build . --config Release` from the `build` directory.
143
+
This will set the appropriate hints for Visual Studio to find both LibTIFF and HDF5. This will create the `apr.dll` library in the `build/Debug` directory. If you need a `Release` build, run `cmake --build . --config Release` from the `build` directory.
144
+
145
+
### Docker build
146
+
147
+
We provide a working Dockerfile that installs the library within the image in a separate [repository](https://github.com/MSusik/libaprdocker).
148
+
149
+
Note: not recently tested.
105
150
106
151
## Examples and Documentation
107
-
These examples can be turned on by adding -DAPR_BUILD_EXAMPLES=ON to the cmake command.
108
152
109
-
There are nine basic examples, that show how to generate and compute with the APR:
153
+
There are 12 basic examples, that show how to generate and compute with the APR. These can be built by adding
154
+
-DAPR_BUILD_EXAMPLES=ON to the cmake command.
110
155
111
156
| Example | How to ... |
112
157
|:--|:--|
113
158
|[Example_get_apr](./examples/Example_get_apr.cpp)| create an APR from a TIFF and store as hdf5. |
114
-
|[Example_apr_iterate](./examples/Example_apr_iterate.cpp)| iterate through a given APR. |
159
+
| [Example_get_apr_by_block](./examples/Example_get_apr_by_block.cpp) | create an APR from a (potentially large) TIFF, by decomposing it into smaller blocks, and store as hdf5.
160
+
|[Example_apr_iterate](./examples/Example_apr_iterate.cpp)| iterate over APR particles and their spatial properties. |
161
+
|[Example_apr_tree](./examples/Example_apr_tree.cpp)| iterate over interior APR tree particles and their spatial properties. |
115
162
|[Example_neighbour_access](./examples/Example_neighbour_access.cpp)| access particle and face neighbours. |
116
163
|[Example_compress_apr](./examples/Example_compress_apr.cpp)| additionally compress the intensities stored in an APR. |
117
164
|[Example_random_access](./examples/Example_random_access.cpp)| perform random access operations on particles. |
118
-
|[Example_ray_cast](./examples/Example_ray_cast.cpp)| perform a maximum intensity projection ray cast directly on the APR data structures read from an APR. |
165
+
|[Example_ray_cast](./examples/Example_ray_cast.cpp)| perform a maximum intensity projection ray cast directly on the APR. |
119
166
|[Example_reconstruct_image](./examples/Example_reconstruct_image.cpp)| reconstruct a pixel image from an APR. |
167
+
|[Example_compute_gradient](./examples/Example_compute_gradient.cpp)| compute the gradient magnitude of an APR. |
168
+
|[Example_apr_filter](./examples/Example_apr_filter.cpp)| apply a filter (convolution) to an APR. |
169
+
|[Example_apr_deconvolution](./examples/Example_apr_deconvolution.cpp)| perform Richardson-Lucy deconvolution on an APR. |
120
170
121
-
All examples except Example_get_aprrequire an already produced APR, such as those created by Example_get_apr.
171
+
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*`.
122
172
123
173
For tutorial on how to use the examples, and explanation of data-structures see [the library guide](./docs/lib_guide.pdf).
124
174
125
175
## LibAPR Tests
126
176
127
-
The testing framework can be turned on by adding -DAPR_TESTS=ON to the cmake command. All tests can then be run by executing on the command line your build folder.
177
+
The testing framework can be turned on by adding -DAPR_TESTS=ON to the cmake command. All tests can then be run by executing
128
178
```
129
179
ctest
130
180
```
131
-
Please let us know by creating an issue, if any of these tests are failing on your machine.
132
-
133
-
## Python support
134
-
135
-
Note: These have been updated and externalised, and will be released shortly.
181
+
on the command line in your build folder. Please let us know by creating an issue, if any of these tests are failing on your machine.
136
182
137
183
## Java wrappers
138
184
139
185
Basic Java wrappers can be found at [LibAPR-java-wrapper](https://github.com/krzysg/LibAPR-java-wrapper)
140
186
141
187
## Coming soon
142
188
143
-
* more examples for APR-based filtering and segmentation
144
-
* deployment of the Java wrappers to Maven Central so they can be used in your project directly
145
-
* support for loading the APR in [Fiji](https://fiji.sc), including [scenery-based](https://github.com/scenerygraphics/scenery) 3D rendering
146
-
* improved java wrapper support
147
-
* CUDA GPU-accelerated APR generation and processing
148
-
* Block based decomposition for extremely large images.
189
+
* Improved documentation and updated library guide.
190
+
* More examples of APR-based image processing and segmentation.
191
+
* CUDA GPU-accelerated APR generation and additional processing options.
149
192
* Time series support.
150
193
151
194
## Contact us
152
195
153
-
If anything is not working as you think it should, or would like it to, please get in touch with us!! Further, if you have a project, or algorithm, you would like to try using the APR for also please get in contact we would be glad to help!
196
+
If anything is not working as you think it should, or would like it to, please get in touch with us!! Further, dont hesitate to contact us if you have a project or algorithm you would like to try using the APR for. We would be glad to help!
154
197
155
198
[](https://gitter.im/LibAPR/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
0 commit comments