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
Copy file name to clipboardExpand all lines: examples/Example_get_apr.cpp
+53-33Lines changed: 53 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,11 @@ Advanced (Direct) Settings:
26
26
-rel_error rel_error_value (Reasonable ranges are from .08-.15), Default: 0.1
27
27
-normalize_input (flag that will rescale the input from the input data range to 80% of the output data type range, useful for float scaled datasets)
28
28
-compress_level (the IO uses BLOSC for lossless compression of the APR, this can be set from 1-9, where higher increases the compression level. Note, this can come at a significant time increase.)
29
+
-compress_type (Default: 0, loss-less compression of partilce intensities, (1,2) WNL (Balázs et al. 2017) - approach compression applied to particles (1 = without prediction, 2 = with)
30
+
31
+
-neighborhood_optimization_off turns off the neighborhood opetimization (This results in boundary Particle Cells also being increased in resolution after the Pulling Scheme step)
32
+
-output_steps Writes tiff images of the individual steps (gradient magnitude, local intensity scale, and final level of the APR calculation).
33
+
29
34
)";
30
35
31
36
#include<algorithm>
@@ -43,31 +48,31 @@ int main(int argc, char **argv) {
43
48
//the apr datastructure
44
49
APR<uint16_t> apr;
45
50
46
-
APRConverter<uint16_t> apr_converter;
47
-
48
51
//read in the command line options into the parameters file
@@ -186,18 +187,25 @@ int main(int argc, char **argv) {
186
187
reconPatch.z_begin = options.z_begin;
187
188
reconPatch.z_end = options.z_end;
188
189
190
+
reconPatch.level_delta = options.level_delta;
191
+
192
+
APRTree<uint16_t> aprTree;
193
+
aprTree.init(apr);
194
+
189
195
// Intentionaly block-scoped since local recon_pc will be destructed when block ends and release memory.
190
196
{
191
197
192
198
if(options.output_pc_recon) {
193
199
//create mesh data structure for reconstruction
194
200
PixelData<uint16_t> recon_pc;
195
201
202
+
ExtraParticleData<uint16_t> partsTree;
196
203
204
+
APRTreeNumerics::fill_tree_from_particles(apr,aprTree,apr.particles_intensities,partsTree,[] (constuint16_t& a,constuint16_t& b) {returnstd::max(a,b);});
APRTreeNumerics::fill_tree_from_particles(apr,aprTree,apr.particles_intensities,partsTree,[] (constuint16_t& a,constuint16_t& b) {returnstd::max(a,b);});
0 commit comments