#define
-ing FAST_COMPILE in PreProcess.h. However, this will make the compilation significantly slower.
G3
1 FLOAT
<RES_X> <RES_Y> <RES_Z>
<M_00> <M_01> <M_02> <M_03>
<M_10> <M_11> <M_12> <M_13>
<M_20> <M_21> <M_22> <M_23>
<M_30> <M_31> <M_22> <M_33>
The first two lines describe the contents of the file -- a 3D grid with a single floating point value per cell.x
-, y
-, and z
-directions.<M>
taking grid-space coordinates to world-coordinates.
<RES_X>
x <RES_Y>
x <RES_Z>
bytes correspond to the (single precision) floating point values
of the implicit function.
#define
-ed.
#define
-ed.
<output header>.<client index>.ply
.
G3
1 FLOAT
<RES_X> <RES_Y> <RES_Z>
<M_00> <M_01> <M_02> <M_03>
<M_10> <M_11> <M_12> <M_13>
<M_20> <M_21> <M_22> <M_23>
<M_30> <M_31> <M_22> <M_33>
The first two lines describe the contents of the file -- a 3D grid with a single floating point value per cell.x
-, y
-, and z
-directions.<M>
taking grid-space coordinates to world-coordinates.
<RES_X>
x <RES_Y>
x <RES_Z>
bytes correspond to the (single precision) floating point values
of the implicit function.
G3
1 FLOAT
<RES_X> <RES_Y> <RES_Z>
<M_00> <M_01> <M_02> <M_03>
<M_10> <M_11> <M_12> <M_13>
<M_20> <M_21> <M_22> <M_23>
<M_30> <M_31> <M_22> <M_33>
The first two lines describe the contents of the file -- a 3D grid with a single floating point value per cell.x
-, y
-, and z
-directions.<M>
taking grid-space coordinates to world-coordinates.
<RES_X>
x <RES_Y>
x <RES_Z>
bytes correspond to the (single precision) floating point values
of the implicit function.
G3
1 FLOAT
<RES_X> <RES_Y> <RES_Z>
<M_00> <M_01> <M_02> <M_03>
<M_10> <M_11> <M_12> <M_13>
<M_20> <M_21> <M_22> <M_23>
<M_30> <M_31> <M_22> <M_33>
The first two lines describe the contents of the file -- a 3D grid with a single floating point value per cell.x
-, y
-, and z
-directions.<M>
taking grid-space coordinates to world-coordinates.
<RES_X>
x <RES_Y>
x <RES_Z>
bytes correspond to the (single precision) floating point values
of the implicit function.
Reconstructors.h
and Extrapolator.h
Using the functionality requires requires choosing a finite element type and defining input oriented-point stream and output vertex and face streams. In the descriptions below, the template parameter Real
is the floating point type used to represent data (typically float
) and Dim
is the integer dimension of the space (fixed at Dim
=3).
FEMSig
describes the 1D finite element type, which is a composite of the degree of the finite element and the boundary conditions it satisfies. Given an integer valued Degree
and boundary type BType
(one of BOUNDARY_FREE
, BOUNDARY_DIRICHLET
, and BOUNDARY_NEUMANN
defined in BSplineData.h
), the signature is defined as:
static const unsigned int FEMSig = FEMDegreeAndBType< Degree , BoundaryType >::Signature;
FEMSIgs
describes the tensor-product finite element type, typically defined as an "isotropic" element with the same 1D finite element type across all Dim
dimensions. It is defined as:
using FEMSigs = IsotropicUIntPack< Dim , FEMSig >;
PoissonRecon::Reconstructor
is omitted for brevity.
InputSampleStream< Real , Dim >
class.
The base class has two pure virtual methods that need to be over-ridden:
void reset( void )
:bool read( Point< Real , Dim > &p , Point< Real , Dim > &n )
:true
if the read was successful and false
if the read failed (i.e. the end of the stream was reached). The class Point< Real , Dim >
represents a point in Dim
-dimensional space, can be accessed like an array (i.e. overloads the bracked operator) and supports algebraic manipulation like addition and scalar multiplication.
OutputPolygonStream
class.
The base class has two pure virtual methods that needs to be over-ridden:
size_t size( void )
:size_t write( const std::vector< node_index_type > &polygon )
:std::vector
of integral indices. (The type node_index_type
is an unsigned int
if the BIG_DATA
macro is not defined an unsigned long long
if it is.) The function returns the index of the written polygon.
OutputVertexStream< Real , Dim >
class.
The base class has two pure virtual methods that needs to be over-ridden:
size_t size( void )
:size_t write( Point< Real , Dim > p , Point< Real , Dim > g , Real w )
:p
, as well as the gradient, g
, and density weight, w
if the extraction code is asked to compute those. The function returns the index of the written vertex.
Implict< Real , Dim , FEMSigs >
object is created, encoding the implicit function describing the geometry, as well as a density function describing the distribution of points in space and (possibly) a function extrapolating per-sample information into a volumetric function. Then, the implicit function is iso-surfaced, (possibly) with auxialiary density and color information evaluated at the vertex positions.
Implict< Real , Dim , FEMSigs > *Poisson::Solver< Real , Dim , FEMSigs >::Solve( InputOrientedSampleStream< Real , Dim > &pointStream , SolutionParameters< Real > params )
:pointStream
) and a description of the reconstruction parameters (params
) desribing the depth, number of samples per node, etc., and returns a pointer to the (dynamically allocated) implicit represetation (Reconstructors.h
, line 622).
void Implicit< Real , Dim , FEMSigs >::extractLevelSet( OutputVertexStream< Real , Dim > &vStream , OutputFaceStream< Dim-1 > &pStream , LevelSetExtractionParameters meParams )
:vStream
) and polygon (pStream
) streams and parameters for level-set extraction (meParams
) and computes the extracted mesh, writing its vertices and faces into the corresponding output streams as they are generated (Reconstructors.h
, line 548).
Implicit< Real , Dim , FEMSigs >::evaluator( void )
:Implicit< Real , Dim , FEMSigs >::Evaluator
. (Note that as the Implicit< Real , Dim , FEMSigs >::Evaluator
object stores const
references to the state in the Implicit< Real , Dim , FEMSigs >
object, it will not be valid once the defining Implicit< Real , Dim , FEMSigs >
object goes out of scope.)
Real Implicit< Real , Dim , FEMSigs >::Evaluator::operator()( Point< Real , Dim > )
:Implicit< Real , Dim , FEMSigs >::Evaluator::OutOfUnitCubeException
is thrown if it is outside of the unit-cube containing the input samples.
Point< Real , Dim > Implicit< Real , Dim , FEMSigs >::Evaluator::grad( Point< Real , Dim > )
:Implicit< Real , Dim , FEMSigs >::Evaluator::OutOfUnitCubeException
is thrown if it is outside of the unit-cube containing the input samples.
Extrapolator::Implicit< Real , Dim , AuxData , DataDegree >::Implicit( InputStream< Real , Dim , AuxData > &pointStream , Parameters params , AuxData zeroAuxData )
:zeroAuxData
is an object representing the zero-element of the auxiliary data.
AuxData Extrapolator::Implicit< Real , Dim , AuxData , DataDegree >::operator()( Point< Real , Dim > p )
:Reconstruction.example.cpp
code.
std::vector
of std::vector< int >
s is defined in lines 213-230 and constructed in line 389.
std::vector
of Real
s is desfined in lines 223-244 and constructed in line 390.
RGBColor
type defined in lines 67-82). The auxiliary inform is derived in one of two ways:
% PoissonRecon --in horse.npts --out horse.ply --depth 10
or the SSD surface reconstructor
% SSDRecon --in horse.npts --out horse.ply --depth 10
% PoissonRecon --in bunny.points.ply --out bunny.ply --depth 10 --pointWeight 0
By default, the Poisson surface reconstructor uses degree-2 B-splines. A more efficient reconstruction can be obtained using degree-1 B-splines:
% PoissonRecon --in bunny.points.ply --out bunny.ply --depth 10 --pointWeight 0 --degree 1
(The SSD reconstructor requires B-splines of degree at least 2 since second derivatives are required to formulate the bi-Laplacian energy.)
% PoissonRecon --in eagle.points.ply --out eagle.pr.ply --depth 10
(with the RGBA color properties automatically detected from the .ply header).% SSDRecon --in eagle.points.ply --out eagle.ssd.ply --depth 10 --density
using the --density flag to indicate that density estimates should be output with the vertices of the mesh, and then calling:
% SurfaceTrimmer --in eagle.ssd.ply --out eagle.ssd.trimmed.ply --trim 7
to remove all subsets of the surface where the sampling density corresponds to a depth smaller than 7.% ChunkPly --in 1 eagle.ssd.trimmed.ply --out eagle.ssd.trimmed.chnks --width 4
which partitions the reconstruction into 11 pieces.
% PoissonRecon --in torso.points.ply --envelope torso.envelope.ply --out torso.pr.ply --depth 10
using the --envelope flag to specify the water-tight mesh constraining the reconstruction.<in dir>
and that a networked temporary folder <temp dir>
exists, a distributed reconstruction of the eagle over 4 clients at depth 10, outputting the reconstruction to eagle.ply
(relative to the directory from the server is run), can be obtained by calling:
% PoissonReconServer --count 4 --depth 10 --in <in dir>/eagle.points.ply --tempDir <temp dir>/temp --out eagle.ply
(with the RGBA color properties automatically detected from the .ply header).Server Address: <IPv4 address>:<port>
The four clients can then be executed by connecting them to the server:
% PoissonReconClient --port <port> --address <IPv4 address>
% PoissonReconClient --port <port> --address <IPv4 address>
% PoissonReconClient --port <port> --address <IPv4 address>
% PoissonReconClient --port <port> --address <IPv4 address>
Alternatively, the four clients can be executed serially:
% PoissonReconClient --port <port> --address <IPv4 address> --multi 4
% PointInterpolant --inValues quadratic.2D.fitting.samples --tree quadratic.2D.tree --dim 2
Then, the reconstructed function can be evaluated at the evaluation samples by calling the adaptive tree visualization:
% AdaptiveTreeVisualization --in quadratic.2D.tree --samples quadratic.2D.evaluation.samples
This will output the evaluation positions and values:
0 0 1.33836e-05
0.5 0 0.25001
0.5 0.5 0.500006
2 2 nan
Note that because the (last) evaluation position (2,2) is outside the bounding box of the fitting samples, the function cannot be evaluated at this point and a value of "nan" is output.
% ImageSitching --in pixels.png labels.png --out out.png
% EDTInHeat --in horse.ply --out horse.edt --depth 9
Then, the visualization code can be used to extract iso-surfaces from the implicit function.% AdaptiveTreeVisualization.exe --in horse.edt --mesh horse_0.01_.ply --iso 0.01 --flip
(By default, the surface is aligned so that the outward facing normal aligns with the negative gradient. Hence, specifying the --flip
flag is used to re-orient the surface.)% AdaptiveTreeVisualization.exe --in horse.edt --mesh horse_0.25_.ply --iso 0.25 --flip
(Since the default --scale
is 2, a value of 0.25 should still give a surface that is contained within the bounding box.)% AdaptiveTreeVisualization.exe --in horse.edt --grid horse.grid
PoissonRecon
and SSDRecon
to support processing of 2D point sets.
PoissonRecon
, SSDRecon
, and AdaptiveTreeVisualization
to support ouput to .jpg
and .png
image files.
DynamicFactory
object is dynamically allocated and not only known at construction time.
Poisson
and SSD
to be classes for cleaner library interface in Reconstruction.example.cpp
.
--width
bug in estimating scale factor.
--width
compatibility bug with default depth.
--exact
bug.
ChunkPly
bug.
--keepSeparate
flag to PoissonReconServer
to output non-fused geometry..
--width
bug.
--kernelDepth
bug that occured when the --width
flag was used to set the reconstruction depth.
_mktemp
.
_mktemp
.
PoissonRecon
namespace.
SANITIZED_PR
.
NestedVector
to reduce synchronization.
--evaluate
flag to the Reconstruction.example
executable that evaluates the implicit function at an interior/exterior/boundary point on the sphere.
--color
flag of the Reconstruction.example
executable to support evaluation of colors from the extrapolated field.
SufaceTrimmer
executable.
Extrapolator
.
Reconstruction.example
to use parallelized extrapolation.