hossein1990 Posted January 3, 2019 Share Posted January 3, 2019 Hi there Is there a way to make a volume from some image slices in Houdini? like bring CT scan slices to a volume and see it in the 3d volume Quote Link to comment Share on other sites More sharing options...
bunker Posted January 5, 2019 Share Posted January 5, 2019 (edited) That should be fairly simple do achieve as long as you have a your images in an ordered list (img_1.tif, img_2.tif, img_3.tif, ...) in a volume wrangle, use the texture function to read the image RGB values > luminance to convert to greyscale and set the volume density using that value. getbbox, to convert x,z to u,v coordinates and the y coordinate as your image index. something like this: // number of images int lastImageIndex=30; // get bounds vector bmin,bmax; getbbox(0,bmin,bmax); // create u,v,imageIndex(y coordinate) float u = fit(@P.x,bmin.x,bmax.x,0,1); float v = fit(@P.z,bmin.z,bmax.z,0,1); int imageIndex = int(fit(@P.y,bmin.y,bmax.y,0,lastImageIndex)); // create imageName, sample RBD, convert to greyscale and write to density string imageFileName = “/path/image_”+itoa(imageIndex)+”.tif”; vector color = texture(imageFileName, u, v, "pixelblur", 2.0); float greyscale = luminance(color); @density = greyscale; hope that makes sense. Edited January 5, 2019 by bunker 2 1 Quote Link to comment Share on other sites More sharing options...
bunker Posted January 5, 2019 Share Posted January 5, 2019 here is a working example, I'm creating the images with a noise in COPs bunker_imageseq2vol_001.hipnc 1 Quote Link to comment Share on other sites More sharing options...
bunker Posted January 5, 2019 Share Posted January 5, 2019 it works brocoli.zip - Broccoli MRI scan gif : https://imgur.com/gallery/KwekIF7 - convert GIF to PNG sequence : https://ezgif.com/split/ Quote Link to comment Share on other sites More sharing options...
anim Posted January 5, 2019 Share Posted January 5, 2019 you can also just create COP2 Network SOP, set method to Volume and inside File COP reading your sequence of files the output of cop2net will be your volume 1 Quote Link to comment Share on other sites More sharing options...
bunker Posted January 5, 2019 Share Posted January 5, 2019 cool, I didn't know about the "COP2 Network SOP" How do you load more than one image at a time though? Quote Link to comment Share on other sites More sharing options...
anim Posted January 5, 2019 Share Posted January 5, 2019 it automatically loads all images of the sequence as z axis of the volume 2 Quote Link to comment Share on other sites More sharing options...
bunker Posted January 5, 2019 Share Posted January 5, 2019 yes, that works great. Quote Link to comment Share on other sites More sharing options...
hossein1990 Posted January 13, 2019 Author Share Posted January 13, 2019 Thank you both (bunker & anim) for the answers. but I`m quite new in Houdini and I don`t know how to do it with VEX or COP2... It would be great if you can explain in a simple way or link me to a video when I search about slices to a volume just brings me volume to slices which I don't need it... In fact, I need to know these: 1- Import image slices in Houdini (they are already ordered and greyscale) 2- Show them as volume Quote Link to comment Share on other sites More sharing options...
mestela Posted January 13, 2019 Share Posted January 13, 2019 example mri slice sequence, and a houdini scene to read it into a volume and display it. capsicum.zip 3 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted January 13, 2019 Share Posted January 13, 2019 I just created a tutorial on how to convert a sequence of slice images to a volume using VEX. slices_to_volume.hiplc 4 2 Quote Link to comment Share on other sites More sharing options...
budlance Posted May 4, 2020 Share Posted May 4, 2020 On 1/13/2019 at 9:16 AM, mestela said: example mri slice sequence, and a houdini scene to read it into a volume and display it. capsicum.zip Hey this is great, thanks for the file. I was wondering when I try to render the volume visualizer I only end up with a cube of particles -- not the volume data that appears in the viewport. What is the best way to render a volume visualizer? Sorry pretty new to Houdini Quote Link to comment Share on other sites More sharing options...
6ril Posted May 6, 2020 Share Posted May 6, 2020 There's an entagma tutorial about that, I made a brain out of scans following it : Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted May 6, 2020 Share Posted May 6, 2020 There is a uniform volume in the material palette. Quote Link to comment Share on other sites More sharing options...
Natopyro Posted May 27, 2021 Share Posted May 27, 2021 On 1/14/2019 at 3:16 AM, mestela said: example mri slice sequence, and a houdini scene to read it into a volume and display it. capsicum.zip When importing an image stack using the COP2 network is it possible to import Cd and control the distance between the slices in the resulting volume? I am trying to create a volume from DICOM data images that have been post processed and colored. I need to create a volume from these that keeps the Cd from the image stack. I am currently using a loop to do this that is pretty much the same as what is done in the Entagma tutorial above, but this COP2 network method could be much more efficient for my needs. Fairly amateur Houdini user here, using it for research into voxel printing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.