Volume from Dicom Image Sequence

   21747   18   4
User Avatar
Member
383 posts
Joined: June 2010
Offline
Is it possible to create a Volume from an image sequence, in particlar a dicom image sequence from a CT- Scanner ?
How could this be done?
Where could i find more information how to do this ?

thx for your time

dulo
www.woogieworks.at
User Avatar
Member
255 posts
Joined: Aug. 2009
Offline
dulo
Is it possible to create a Volume from an image sequence, in particlar a dicom image sequence from a CT- Scanner ?
How could this be done?
Where could i find more information how to do this ?

thx for your time

dulo
interesting request :shock: .
the best and fastest way is creating c++ plugin.

check http://www.sidefx.com/docs/hdk11.0/hdk_volumes.html [sidefx.com] for more information.
https://vimeo.com/user3251535 [vimeo.com]
https://twitter.com/milansuk [twitter.com]
https://github.com/milansuk [github.com]
User Avatar
Member
639 posts
Joined: July 2005
Offline
You can do it in Image3D context. However, you'll have to figure a way to read the slices in the Z direction. I haven't had time to look that deep into this, but just know that I've seen it done before purely in Image3D context without any additional plugins. Might be easier now with Volume Primitive…
User Avatar
Member
383 posts
Joined: June 2010
Offline
What do you mean by reading the slices in Z Direction?
I have already written a converter which can translate Dicom to exr or png sequences and within this converter i can manipulate the dicom data in all kind of ways ..
Houdini has a file format for volume images / matrices, maybe i could write a file converter ..
www.woogieworks.at
User Avatar
Member
639 posts
Joined: July 2005
Offline
Right, once you have tiff sequence or whatever format that Houdini can read, you have a sequence of scan images. For example, let's say you have 100 frames of CT scan, with 300x300 resolution. Each frame of your scan would represent a slice. You can construct a voxel buffer of 300x300x100. Reading in the x and y of a single frame is easy, but how do we go about reading different “frame” of the image at each unit is a different story…


…now that I think about it a little, I feel my memory is a bit fuzzy now if he actually do it entirely in Image3D or if he wrote an additional function in hdk to do this… it's been 7 or 8 years now.
User Avatar
Member
8786 posts
Joined: July 2007
Offline
it can be easily done in Volume VOP
i've done it before for my friend's CT just for fun, maybe i can find it somewhere
but i created it somehow like this

create empty volume with Volume VOP with Z resolution being number of your images in sequence, XY doesn't really matter since they will interpolate but they should keep aspect to avoid distortion

then in Volume VOP
you can read image inside through colormap
and you can sample it through IX/RESX in U and IY/RESY in V
you'll need to change texture name accordng to IZ, you'll need inline VOP for this
then taking luminance and using it as density or process through ramp or something to have more control
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
383 posts
Joined: June 2010
Offline
I had the same Idea. I wanted to test the Volume VOP so i tried avoid the Problem of itterating through an image sequence so as a first step i wanted to create a Stack of the SideFX Butterfly.
The Attached Volume VOP does something. It changes a IsoSurface Volume i created and the volume changes if i feed other images, but shouldnt i just see a Stack of Butterflies ???
Also tried the checkerboard image but i always get a homogenous volume.

Attachments:
HoudiniVolume.jpg (120.3 KB)

www.woogieworks.at
User Avatar
Member
383 posts
Joined: June 2010
Offline
finally managed to take an image sequence and feed it into a volume.
I really love the new OpenGL Volume preview. Nearly as nice as VTK live rendering.
Next step will be to write an importer for dicom.
Does anyone know if this is possible in python or does it take HDK for this job ?
Try to avoid HDK because of the pain of staying in sync with the Houdini version ( recompile plugin each time eg a daily build is installled .. )

Attachments:
VolumeFromSequence.zip (1.1 MB)

www.woogieworks.at
User Avatar
Member
383 posts
Joined: June 2010
Offline
Just succeeded in installing VTK and GDCM in Houdini x64 windows -> next step towards dicom -> volume reader !!
www.woogieworks.at
User Avatar
Member
88 posts
Joined: March 2010
Offline
dulo
finally managed to take an image sequence and feed it into a volume.
I really love the new OpenGL Volume preview. Nearly as nice as VTK live rendering.
Next step will be to write an importer for dicom.
Does anyone know if this is possible in python or does it take HDK for this job ?
Try to avoid HDK because of the pain of staying in sync with the Houdini version ( recompile plugin each time eg a daily build is installled .. )

Hi

Is this working in H11? It crashes on me.I really want to see this one working

I have made a pseudo one with copy SOP and metaballs(based on the sequence). I would love to figure it out with Volume SOPs


thanks
User Avatar
Member
330 posts
Joined: July 2007
Offline
kursad
Hi

Is this working in H11? It crashes on me.I really want to see this one working

I have made a pseudo one with copy SOP and metaballs(based on the sequence). I would love to figure it out with Volume SOPs


thanks

yes it's working here at my workstation and even opened it in my hp-tx2 laptop last night . ( at the beginning , it keeps cooking the vop vex , but doesn't crash … )

thanQ for sharing it dulo !



.cheers
except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
383 posts
Joined: June 2010
Offline
Have a new version working which reads Dicom .dcm files in 16 bit int depth with the help of gdcm and numpy in python. Will do some more polishing over chrismas and publish the new hipnc file then..

have a nice christmas

cheers dulo
www.woogieworks.at
User Avatar
Member
88 posts
Joined: March 2010
Offline
dulo
Have a new version working which reads Dicom .dcm files in 16 bit int depth with the help of gdcm and numpy in python. Will do some more polishing over chrismas and publish the new hipnc file then..

have a nice christmas

cheers dulo

Thanks for sharing dulo. I will be waiting for the new version
User Avatar
Member
4 posts
Joined: July 2005
Offline
Hi. Any update on the Dicom importer?
This is a pet project for me to visualize my skull in 3 D before they remove the right side of my jaw, so I'd love it if I could use your importer.

Cheers

Chris
Tis the numbers that make me freak in...
User Avatar
Member
383 posts
Joined: June 2010
Offline
Yes its already working, but its quite hard to compile the python libs necessary for dicom reading for hython. hython modules also need to be compiled with the same compiler a houdini itself -> so its impossible to use any precompiled packages and this makes it also very hard to distribute any python nodes using those packages. I have not managed till now to create a python installer package with my selfmade libs .. but maybe in the future.
I am also thinking about using the unix command node to call little binaries i created to convert the image sequence into tiff, which would be a much more portable way of working.

Its quite sad that its nearly impossible to create distributable plugins without compiling for hundreds of versions of houdini ..

i will keep posting my progress

cheers

martin
www.woogieworks.at
User Avatar
Member
51 posts
Joined: July 2005
Offline
Not sure if I should start a new thread or revive this one.

I've got a sequence of DICOM images that I converted to tif and trying to visualize to no avail.

Even when I try to use your example file with the slices it doesn't display the intended volume, just showing a box.

Has something changed in Houdini, I'm using both 12.5 and 13 or am I missing something?
User Avatar
Member
383 posts
Joined: June 2010
Offline
I can't exactly remember the setup but as far as I can remember most of the problem came from wrong colordepth and RGB vs. Grayscale Images ..
At the moment I am quite short on time .. I will take a look into the matter soon and come back to you ..
www.woogieworks.at
User Avatar
Member
51 posts
Joined: July 2005
Offline
Thank you. It appears that the sample files you uploaded also don't work anymore.

I appreciate the help.
User Avatar
Member
14 posts
Joined: Sept. 2011
Offline
i would love to see any example hip files on this topic anyone might have.

appreciation in advance to anyone willing to share.

this looks interesting.
  • Quick Links