Skip to content

Commit

Permalink
better scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoeurjo committed Oct 31, 2017
1 parent 831bfbd commit 2758e55
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions converters/mesh2vol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,16 @@ void voxelizeAndExport(const std::string inputFilename,
//Digitization step
Z3i::DigitalSet mySet(aDomain);
MeshVoxelizer<Z3i::DigitalSet, SEP> aVoxelizer;

auto start = std::chrono::high_resolution_clock::now();
aVoxelizer.voxelize(mySet, inputMesh, 1.0);
auto end = std::chrono::high_resolution_clock::now();
auto diff = end - start;

trace.info() << " [done] (" << std::chrono::duration <double, std::milli> (diff).count() << " ms)" << std::endl;
trace.info() << " [done] " << std::endl;
trace.endBlock();

trace.beginBlock("Exporting");
// Export the digital set to a vol file
trace.info()<<aDomain<<std::endl;
ImageContainerBySTLVector<Domain, unsigned char> image(aDomain);
for(auto p: mySet)
{
trace.info()<<"Adding "<<p<<std::endl;
image.setValue(p, 128);
}
image >> outputFilename.c_str();
trace.endBlock();
}
Expand Down

0 comments on commit 2758e55

Please sign in to comment.