Comments (5)
This problem was addressed (with a few possible solutions) at issue #22.
from poissonrecon.
Apologies, did not see that when searching the issues.
For the sake of completeness:
Replacing the set() method in Allocator.h
with the following allows for the code to be run more than once:
void set( int blockSize )
{
if (this->blockSize != blockSize)
{
reset();
this->blockSize = blockSize;
index = -1;
remains = 0;
}
}
Is there any reason this has not been added to the code outright?
from poissonrecon.
While this could work, I am hesitant to incorporate the fix within the code because it doesn't reallocate the memory. (Nor would it give correct behavior if the second pass used a different memory block size.)
from poissonrecon.
So is moving OctNode< TreeNodeData >::SetAllocator(MEMORY_ALLOCATOR_BLOCK_SIZE);
above Octree< Real > tree;
a more viable solution since it does reallocate the memory?
from poissonrecon.
Just tested it (moving SetAllocator()). This solution works for me as well, and is indeed better than my previous suggestion.
But I think a more explicit protection should be incorporated in the code (in addition to the above).
Maybe at Octree.inl add a check to see if memory was already allocated:
template< class NodeData >
void OctNode< NodeData >::SetAllocator(int blockSize)
{
if( (blockSize>0) && (false==MemoryAlreadyAllocated))
{
UseAlloc=1;
MemoryAlreadyAllocated = true;
NodeAllocator.set(blockSize);
}
else{UseAlloc=0;}
}
I guess UseAlloc could've been used for this, but I think adding a new variable for this is cleaner. This is what I currently plan to do in my code.
from poissonrecon.
Related Issues (20)
- Real-time monitoring memory HOT 2
- How does work the Point <Real, Dim> struct HOT 4
- Failed to build with default libjpeg,libpng, and libz. HOT 1
- How to get the number of points corresponding to an octree node HOT 8
- sln is incorrect HOT 1
- Normals - inward or outward? HOT 1
- Can we conclude a leaf node is fully inside the object if indicator function evaluations on its faces come out above the iso-value? HOT 4
- SSD Recon with Dirichelet boundary condition HOT 2
- PLY file not supported HOT 3
- Envelope Generation in PoissonRecon Integration with CloudCompare HOT 4
- PoissonRecon: Interaction between `--width` and `--depth` parameters is not well documented HOT 2
- using --exact in PoissonRecon.exe HOT 5
- A problem running with vs2019 HOT 1
- the program crushed with empty file write error message. HOT 2
- Segmentation Fault for create_from_point_cloud_poisson when n_threads is not 1.
- question about SurfaceTrimmer HOT 1
- a question about adaptive solvers HOT 3
- A question about compile v2/v3/v4 source code HOT 4
- Failed to Build : W10 VS2017 HOT 19
- A question about how to get the iso value in V1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poissonrecon.