CT/MR scans > 3D viewer
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: CT/MR scans > 3D viewer
Mythos, we are not trying to give an image depth (2D --> 3D). What we get from a scan is several 2D slices. We create/inherit points on those planar slices. The slices are a distance apart (3.1mm) and so the points are 3D, but each group of points belonging to a slice stay on their respective slice plane.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: CT/MR scans > 3D viewer
You would have to show me in the code how this idea works. I would understand much better with an example.
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: CT/MR scans > 3D viewer
Just take a look at Marc's images in this post, especially the one of his mum as you can clearly see slicing.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: CT/MR scans > 3D viewer
Hi Mythros,
Let say, we do a CT scan from a part of the body,
with was for my mother the abdomen / intestinal canal
So, the zone => 150 images x 3.1mm distance => +-450 mm body part.
It is like you cut the body in 2 parts and look on top of it.
And you take a picture of what you see.
What I do,
1 ) I load first (gray-scale) image (518x518 pixels)
2 ) Read the color info/pixel (x = 0...517, y = 0...517) = 268324 px/image
3 ) go to step 1 till last image
4 ) create the 3D pointed mesh with (518px*518px/image * 150 images = 40248600 3D points in the mesh) xyz data.
5 ) I select what I want to see, like above, you see the skeleton.
6 ) I can select zones/parts in the 3D point/mesh,
- the yellow cube is the overall outside
- the blue cube is the selected transparency/cut away zone
- the red cube is the colored zone
what you can see here
http://www.marc-systems.be/new_2010/Vie ... amples.htm
Some, are my fathers cancer (red colored)
9) What I do now, is to write some contrast algorithms to highlight some organs ...
So, I created a 3D pointed mesh, that I can scale/rotate
But there is my problem,
rotate the pointed mesh is ok,
but when I scale/zoom, I get this moire effect...
And that is the goal of the program, to look inside the organs and see differences in the textures, deformations
or abnormal models.
Some info about Scanner:
http://en.wikipedia.org/wiki/Medical_imaging
My mother is home since yesterday, so I have to look after her,
but I go clear up the source and create some demo version to understand the results.
Let say, we do a CT scan from a part of the body,
with was for my mother the abdomen / intestinal canal
So, the zone => 150 images x 3.1mm distance => +-450 mm body part.
It is like you cut the body in 2 parts and look on top of it.
And you take a picture of what you see.
What I do,
1 ) I load first (gray-scale) image (518x518 pixels)
2 ) Read the color info/pixel (x = 0...517, y = 0...517) = 268324 px/image
3 ) go to step 1 till last image
4 ) create the 3D pointed mesh with (518px*518px/image * 150 images = 40248600 3D points in the mesh) xyz data.
5 ) I select what I want to see, like above, you see the skeleton.
6 ) I can select zones/parts in the 3D point/mesh,
- the yellow cube is the overall outside
- the blue cube is the selected transparency/cut away zone
- the red cube is the colored zone
what you can see here
http://www.marc-systems.be/new_2010/Vie ... amples.htm
Some, are my fathers cancer (red colored)


9) What I do now, is to write some contrast algorithms to highlight some organs ...
So, I created a 3D pointed mesh, that I can scale/rotate
But there is my problem,
rotate the pointed mesh is ok,
but when I scale/zoom, I get this moire effect...
And that is the goal of the program, to look inside the organs and see differences in the textures, deformations
or abnormal models.
Some info about Scanner:
http://en.wikipedia.org/wiki/Medical_imaging
My mother is home since yesterday, so I have to look after her,
but I go clear up the source and create some demo version to understand the results.
Last edited by marc_256 on Fri May 09, 2014 8:39 pm, edited 1 time in total.
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: CT/MR scans > 3D viewer
Hi Marc
I assume the scale/zoom is done via the Camera settings. Might the moire effect effect be a GPU issue? Have you tried it on another PC?but when I scale/zoom, I get this moire effect...
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: CT/MR scans > 3D viewer
@IdeasVacuum
Yes, I move the camera closer or further away from the object (pointed mesh),
Now, but I will test this with my other (fathers) laptop and desktop PC.
If I have some time !!, I go make some demo .exe file, so if you have some time,
will you test this for me on your pc ?
For now info:
Windows 8.1 x64
Purebasic 5.22 LTS final x64
I go to compile it with purebasic 5.22 LTS / 32 bits PC also ...
Yes, I move the camera closer or further away from the object (pointed mesh),
Now, but I will test this with my other (fathers) laptop and desktop PC.
If I have some time !!, I go make some demo .exe file, so if you have some time,
will you test this for me on your pc ?
For now info:
Windows 8.1 x64
Purebasic 5.22 LTS final x64
I go to compile it with purebasic 5.22 LTS / 32 bits PC also ...
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: CT/MR scans > 3D viewer
The transparency/contrast algorithm used on a cut away part of the body scans.
the best result I have for now.

You can see the liver inside, with the cancer in black.
the best result I have for now.

You can see the liver inside, with the cancer in black.
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: CT/MR scans > 3D viewer
Hi Marc. I'd be delighted to test the exe for you.
Edit: If you pm me, I can give you access to my ftp.
Edit: If you pm me, I can give you access to my ftp.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: CT/MR scans > 3D viewer
Just out of curiosity what material filtering mode are you using? You could play around with MaterialFilteringMode(#Material, Mode [, MaxAnisotropicValue])marc_256 wrote: but when I scale/zoom, I get this moire effect...
to see if the effect disappears or lessens.
Re: CT/MR scans > 3D viewer
Hi Samuel,
I used this 2 filtering modes:
MaterialFilteringMode(1, #PB_Material_Trilinear)
MaterialFilteringMode(1, #PB_Material_Anisotropic, 8 )
with the same results.
I used this 2 filtering modes:
MaterialFilteringMode(1, #PB_Material_Trilinear)
MaterialFilteringMode(1, #PB_Material_Anisotropic, 8 )
with the same results.
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: CT/MR scans > 3D viewer
This is a test program of creating 3D images in a canvas-gadget,
is very slow, every 3D calculation is made in CPU/FPU.
But this gives some opportunity to manipulate the image data.


is very slow, every 3D calculation is made in CPU/FPU.
But this gives some opportunity to manipulate the image data.


- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: CT/MR scans > 3D viewer
@marc_256: Can you please release the source code?
Thank you VERY much!
Have a nice day!
Thank you VERY much!
Have a nice day!
Re: CT/MR scans > 3D viewer
Hi Mythros,Mythros wrote:@marc_256: Can you please release the source code?
Thank you VERY much!
Have a nice day!
I will one day,
but before I do this, I want to clear up the prototype source.
So we can start with a cleaned version we can build on.
I find it to dangerous to start with a buggy source and build on that.
And I go put every step in separated procedures, so it becomes clear for every participant.
Secondly, I will use openGL so we can build multi platform.
For now, see it as a open project, and in a while it becomes an open source...
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
PS: sorry for my english I speak flemish ...
Re: CT/MR scans > 3D viewer
YAY! Thank you VERY much for doing this! I APPLAUD you for turning an image into a full 3d model!marc_256 wrote:Hi Mythros,Mythros wrote:@marc_256: Can you please release the source code?
Thank you VERY much!
Have a nice day!
I will one day,
but before I do this, I want to clear up the prototype source.
So we can start with a cleaned version we can build on.
I find it to dangerous to start with a buggy source and build on that.
And I go put every step in separated procedures, so it becomes clear for every participant.
Secondly, I will use openGL so we can build multi platform.
For now, see it as a open project, and in a while it becomes an open source...

I've been trying to do this for YEARS!
Thanks again, and have a GREAT afternoon!

Sincerely,
Mythros
Re: CT/MR scans > 3D viewer
Hello Marc, sorry for your family. I've seen your topic and I'm interested because I've tried to do the same thing by the past with the result of a topographic 3d scanner (topology of a cave). I've not coded anything, just using some software, but not with good result, so I gived up. Anyway, I've seen some good 3d models that let me think there's already some 3d software that is doing the job, but not freely available by now. They compute what is knows as a Delaunay Triangulation, you surely already know that. But first (or after), it could be useful to reduce the point number. There's also some good algo to do that. In your particular case, I imagine there's some thickness of the organs that should help to determine if you're "inside" or "outside". At this point, the polygon (with a normal) and the closed shape seems necessary to me...