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
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
54
+
### CMake build options
30
55
56
+
Several CMake options can be given to control the build. Use the `-D` argument to set each
57
+
desired option. For example, to disable OpenMP, change the cmake calls below to
31
58
```
32
-
git pull
33
-
git submodule update
59
+
cmake -DAPR_USE_OPENMP=OFF ..
34
60
```
35
61
62
+
| Option | Description | Default value |
63
+
|:--|:--|:--|
64
+
| APR_BUILD_SHARED_LIB | Build shared library | ON |
65
+
| APR_BUILD_STATIC_LIB | Build static library | OFF |
66
+
| APR_BUILD_EXAMPLES | Build executable examples | OFF |
67
+
| APR_TESTS | Build unit tests | OFF |
68
+
| APR_BENCHMARK | Build executable performance benchmarks | OFF |
69
+
| APR_USE_LIBTIFF | Enable LibTIFF (Required for tests and examples) | ON |
70
+
| APR_PREFER_EXTERNAL_GTEST | Use installed gtest instead of included sources | OFF |
71
+
| APR_PREFER_EXTERNAL_BLOSC | Use installed blosc instead of included sources | OFF |
72
+
| APR_USE_OPENMP | Enable multithreading via OpenMP | ON |
73
+
| APR_USE_CUDA | Enable CUDA (Under development - APR conversion pipeline is currently not working with CUDA enabled) | OFF |
74
+
36
75
### Building on Linux
37
76
38
77
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.
@@ -46,11 +85,7 @@ cmake ..
46
85
make
47
86
```
48
87
49
-
This will create the `libapr.so` library in the `build` directory, as well as all of the examples.
50
-
51
-
### Docker build
52
-
53
-
We provide a working Dockerfile that install the library within the image on a separate [repo](https://github.com/MSusik/libaprdocker).
88
+
This will create the `libapr.so` library in the `build` directory.
54
89
55
90
### Building on OSX
56
91
@@ -67,7 +102,8 @@ cmake ..
67
102
make
68
103
```
69
104
70
-
This will create the `libapr.dylib` library in the `build` directory, as well as all of the examples.
105
+
This will create the `libapr.dylib` library in the `build` directory.
106
+
71
107
72
108
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.
135
+
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.
136
+
137
+
### Docker build
138
+
139
+
We provide a working Dockerfile that installs the library within the image in a separate [repository](https://github.com/MSusik/libaprdocker).
140
+
141
+
Note: not recently tested.
100
142
101
143
## Examples and Documentation
102
-
These examples can be turned on by adding -DAPR_BUILD_EXAMPLES=ON to the cmake command.
103
144
104
-
There are nine basic examples, that show how to generate and compute with the APR:
145
+
There are 12 basic examples, that show how to generate and compute with the APR. These can be built by adding
146
+
-DAPR_BUILD_EXAMPLES=ON to the cmake command.
105
147
106
148
| Example | How to ... |
107
149
|:--|:--|
108
150
|[Example_get_apr](./examples/Example_get_apr.cpp)| create an APR from a TIFF and store as hdf5. |
109
-
|[Example_apr_iterate](./examples/Example_apr_iterate.cpp)| iterate through a given APR. |
151
+
| [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.
152
+
|[Example_apr_iterate](./examples/Example_apr_iterate.cpp)| iterate over APR particles and their spatial properties. |
153
+
|[Example_apr_tree](./examples/Example_apr_tree.cpp)| iterate over interior APR tree particles and their spatial properties. |
110
154
|[Example_neighbour_access](./examples/Example_neighbour_access.cpp)| access particle and face neighbours. |
111
155
|[Example_compress_apr](./examples/Example_compress_apr.cpp)| additionally compress the intensities stored in an APR. |
112
156
|[Example_random_access](./examples/Example_random_access.cpp)| perform random access operations on particles. |
113
-
|[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. |
157
+
|[Example_ray_cast](./examples/Example_ray_cast.cpp)| perform a maximum intensity projection ray cast directly on the APR. |
114
158
|[Example_reconstruct_image](./examples/Example_reconstruct_image.cpp)| reconstruct a pixel image from an APR. |
159
+
|[Example_compute_gradient](./examples/Example_compute_gradient.cpp)| compute the gradient magnitude of an APR. |
160
+
|[Example_apr_filter](./examples/Example_apr_filter.cpp)| apply a filter (convolution) to an APR. |
161
+
|[Example_apr_deconvolution](./examples/Example_apr_deconvolution.cpp)| perform Richardson-Lucy deconvolution on an APR. |
115
162
116
-
All examples except Example_get_aprrequire an already produced APR, such as those created by Example_get_apr.
163
+
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*`.
117
164
118
165
For tutorial on how to use the examples, and explanation of data-structures see [the library guide](./docs/lib_guide.pdf).
119
166
120
167
## LibAPR Tests
121
168
122
-
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.
169
+
The testing framework can be turned on by adding -DAPR_TESTS=ON to the cmake command. All tests can then be run by executing
123
170
```
124
171
ctest
125
172
```
126
-
Please let us know by creating an issue, if any of these tests are failing on your machine.
127
-
128
-
## Python support
129
-
130
-
Note: These have been updated and externalised, and will be released shortly.
173
+
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.
131
174
132
175
## Java wrappers
133
176
134
177
Basic Java wrappers can be found at [LibAPR-java-wrapper](https://github.com/krzysg/LibAPR-java-wrapper)
135
178
136
179
## Coming soon
137
180
138
-
* more examples for APR-based filtering and segmentation
139
-
* deployment of the Java wrappers to Maven Central so they can be used in your project directly
140
-
* support for loading the APR in [Fiji](https://fiji.sc), including [scenery-based](https://github.com/scenerygraphics/scenery) 3D rendering
141
-
* improved java wrapper support
142
-
* CUDA GPU-accelerated APR generation and processing
143
-
* Block based decomposition for extremely large images.
181
+
* Improved documentation and updated library guide.
182
+
* More examples of APR-based image processing and segmentation.
183
+
* CUDA GPU-accelerated APR generation and additional processing options.
144
184
* Time series support.
145
185
146
186
## Contact us
147
187
148
-
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!
188
+
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!
149
189
150
190
[](https://gitter.im/LibAPR/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
0 commit comments