MarchingCube | Marching cube implementation in Unity | Editor library
kandi X-RAY | MarchingCube Summary
kandi X-RAY | MarchingCube Summary
Marching cube implementation in Unity.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of MarchingCube
MarchingCube Key Features
MarchingCube Examples and Code Snippets
Community Discussions
Trending Discussions on MarchingCube
QUESTION
I am making a marching cubes project in python using PyQt5 and PyOpenGL. I am trying to hide the wireframe cube which marches across the screen, referenced as mainWindow.marchingCube
to disappear after cycling through. I managed to get the disappearing cycle to occur, but the cube does not actually disappear. I called the QOpenGLWidget
's update function, but the cube still did not disappear.
ANSWER
Answered 2020-Feb-19 at 09:54You are missing 1 call to self.openGLWidget.update()
. There is a return
statement in the instruction block of the if
. The function is terminated at this point and the self.openGLWidget.update()
instruction at the end of the code is never executed.
Add self.openGLWidget.update()
right before return
, to solve the issue:
QUESTION
I am currently sitting on an task in which I need to plot DICOM slices into one 3D model using NumPy, Matplotlib, (Marchingcubes, Triangulation or Volumemodel)
I have tried the method from this website :
https://www.raddq.com/dicom-processing-segmentation-visualization-in-python/
but unfortunately it didn't worked out for me
...ANSWER
Answered 2019-Jun-24 at 07:03There is an example of loading a set of 2D CT slices and building a 3D array.
https://github.com/pydicom/pydicom/blob/master/examples/image_processing/reslice.py
It does not go on to construct the surface, but it should solve the first half of your problem.
QUESTION
I had done surface rendering using vtk marching cubes and now I need to do clipping in that.
I searched and found how to do clipping in volume rendered output(i.e.; using ray casting method) .But I need to do clipping in surface rendered output. so I created a vtkClipPolyData
...ANSWER
Answered 2019-Feb-22 at 15:13You can try using a vtkSliderWidget. There's an example of how to use it here. On its callback, you can set the clipping plane's position.
Another option: You could use a vtkImplicitPlaneWidget2 (note: the 2 there is because there's a new and an old version - use the '2' versions whenever possible).
QUESTION
I have tried to implement an applet showing the distinct types of space quadrics with the Marching Cubes library of three.js to render implicit surfaces. The shapes that appear though are not right and I guess I am not implementing the properties of THREE.MarchingCubes
as needed. The core of the applet has the following code
ANSWER
Answered 2018-May-16 at 13:44To use THREE.MarchingCubes:
Include MarchingCubes.js via
Allocate the volume with resolution R, which will be a voxel cube with resolution R x R x R, via
V = new THREE.MarchingCubes( R, material )
Fill in the voxel values, which are a linear array of float values. The index for a voxel at location [X,Y,Z] is (X + (Y * R) + ( Z * R * R)). Set the values via
V.field[ i + j*R + k*R*R ] = f
Set the
isolation
value. The displayed volume will be all voxels less than this value, so this could all be called iso-surface value. Set the value viaV.isolation = s
.
It seems your code is working correctly. Increasing a11 does reduce the volume in the x dimension as expected.
The only thing I noticed is the code multiplying a12
and a13
and a23
by 2. If a quadric equation is expressed as:
Ax^2 + By^2 + Cz^2 + Dxy + Exz + Fyz + Gz + Hy + Iz + J = 0
And the calculation is: data.a11*x*x + data.a22*y*y + data.a33*z*z + data.a12*2*x*y + data.a13*2*x*z + data.a23*2*y*z + data.a1*x + data.a2*y + data.a3*z + data.a
, then it seems to multiply D E and F by two for no reason?
Otherwise, was there a bug you've resolved since posting the question? Or could you be more specific about the problem?
Bug report: There's a bug report 14060 logged against three.js here. As of May 2018, with three.js version r92, it appears the Marching Cubes library is working in (1) Firefox in Windows and MacOS, (2) Safari on MacOS. It appears buggy in Firefox on Linux, and in Chrome on any system. Turning off flat shading may resolve the problem.
QUESTION
Here is a simple h
file:
ANSWER
Answered 2018-Mar-31 at 21:01The code I gave in the update works :)
In marchingcubes.hsc
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MarchingCube
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page