-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to export bones of a dicom set (for example in .obj) in AMI.js? #391
Comments
My understanding is that one can use the threejs obj exporter [SO](
https://stackoverflow.com/a/19351605/6059235) [github](
https://github.com/mrdoob/three.js/blob/3510fdd91725f7681db845efd889c5e29e6e7446/examples/js/exporters/OBJExporter.js)
to export the Mesh
edit: my apologies, as you have already pointed out, this does not solve your problem
…On Wed, Aug 28, 2019 at 10:56 AM cpanap00 ***@***.***> wrote:
Description
I want to load some DICOM files and export the bones of that files or at
least the volume. I already load the DICOM files and get the quadview and
the volume Rendering, but I want to export the bones of that files.
When I export to .obj I get the box which is the content of the volume but
I want to export the content inside.
Steps to Reproduce Expected Results
What I would really like is to export the bones and then slice it get only
a part of that, for example get only the clavicle.
I would like to export this:
[image: image]
<https://user-images.githubusercontent.com/17741571/63840565-93d9cf00-c981-11e9-98d7-cac6efb42a70.png>
Actual Results
But I am only be able to export an empty box
This is the mesh that I am exporting which has 12 faces and 8 vertices and
it has geometry: BoxGeometry, I Know that this is wrong but I don´t Know
how to get the real mesh
[image: image]
<https://user-images.githubusercontent.com/17741571/63841009-4c077780-c982-11e9-8f37-cd662894c4b0.png>
I tried to create a labelmap using threshold and get only bones and then
create a mesh from that labelmap but I wasn't able to do that.
Thank you very much.
Browsers Affected
- All
- Chrome
- Firefox
- Edge
- Safari 9
- Safari 8
- IE 11
Versions
- AMI: v.0.32.0
- THREEJS: v.1.0.7
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#391?email_source=notifications&email_token=AET34F6J22NEYP7DZMEWDGDQGY4UXA5CNFSM4IQ7ZKKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HH3QWXQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AET34FZJPL4QEC5WZAYEJGTQGY4UXANCNFSM4IQ7ZKKA>
.
|
Hi, you can not export anything from the volume rendering itself: first you must generate a 3d model from the voxels values, using marching cubes for instance, then export it to the format of your choice! |
Thank you but I already use OBJExporter and It works fine, That's why I get the box my problem is that I need to generate a 3D model to export it. |
See comments above above marching cubes :) |
Thank You NicolasRannou, that's what I thought, I had already search about marching cubes and perhaps I need to do it in Back-End such as C++ or python because I didn´t find anything using javascript. Do I need to do a labelmap using threshold in order to export only the bones or It won't be necessary? Thank You again. |
So yes you can write your own JS implementation (probably using web-workers somehow for performance) or do it in the back end (which may be faster anyway). In theory, all you need is the DICOM data. From there you can just iterate through the voxels and for each of them, depending on its intensity decide whether it should be part of the mesh or not! |
Okay, Thank You very much. |
I'm sorry to bother you again but I'm not able to get the mesh. I think the problem is from the data I use to get the mesh. However when I use marching cubes algorithm this is what I get: The form is very similar but It is not perfect. I'm using this https://github.com/kig/gl-volume3d-demo for the marching cubes algorithm and I'm passing the dimensions too which are x:512 y:512 and z:61 in this case: This is how I export to TXT the data: My question is: What am I doing wrong? |
Description
I want to load some DICOM files and export the bones of that files or at least the volume. I already load the DICOM files and get the quadview and the volume Rendering, but I want to export the bones of that files.
When I export to .obj I get the box which is the content of the volume but I want to export the content inside.
Steps to Reproduce
Load DICOM data
I Load the volume using vrHelper = new AMI.VolumeRenderingHelper(stack);
I export it using OBJExporter and passing the scene which contains the volume, i also tried to pass the mesh ( let exporter = new THREE.OBJExporter(); let obj = exporter.parse(mesh);)
Expected Results
What I would really like is to export the bones and then slice it get only a part of that, for example get only the clavicle.
I would like to export this:
Actual Results
But I am only be able to export an empty box
This is the mesh that I am exporting which has 12 faces and 8 vertices and it has geometry: BoxGeometry, I Know that this is wrong but I don´t Know how to get the real mesh
I tried to create a labelmap using threshold and get only bones and then create a mesh from that labelmap but I wasn't able to do that.
Thank you very much.
Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: