Hello Adrian, in case of segmented sub-volumes of a larger volume, assuming the original larger volume is large.vti and the level set segmentations obtained from two smaller volumes (both extracted from large.vti) are ls1.vti and ls2.vti, you first need to resample the ls* volumes back onto the large.vti image grid:
vmtkimagereslice -ifile ls1.vti -rfile large.vti -ofile ls1_resl.vti -background 5 vmtkimagereslice -ifile ls2.vti -rfile large.vti -ofile ls2_resl.vti -background 5 Here I specified background to an (arbitrary) positive value, assuming that level sets have the negative inside, positive outside convention. The background value is used for the regions of the larger volume that lies outside the extent of the smaller volume (which is assumed to be "outside" the segmented shape, hence the positive background value). At this point you have two compatible resampled ls* volumes and you can use vmtkimagecompose to merge the two segmentations. Cheers, Luca On Mar 31, 2013, at 6:39 PM, adrianrh wrote: > Hello Luca, > > Thank you for the answer, it is helpful. I actually need to combine > images from the same geometry and from different geometries at different > points in my work. I have some higher quality MR scans that are on a > smaller domain and would like to understand how to combine it with a > lower quality image of a bigger domain. So getting some more details > would really be nice. > > > > Best regards Adrian > > On 2013-03-29 13:53, Luca Antiga wrote: >> Hello Adrian, >> >> there is a way of combining level set files. After all, they are all >> image files, so here's how you do it: >> >> in case they are all produced from the same input image (i.e. they >> have the same geometry), you can go >> vmtkimagecompose -ifile ls1.vti -i2file ls2.vti -ofile ls_combined.vti >> If you have more than 2, you'll have to call another vmtkimagecompose >> on the result of the former; >> >> in case they are produced from different input images (hence they >> have different spatial extents) you'll first have to resample them >> onto >> a common grid using vmtkimagereslice; let me know if this is your case >> and I'll provide you with more details. >> >> Best, >> >> Luca >> >> On Mar 25, 2013, at 3:08 PM, adrianrh wrote: >> >>> Hi! >>> >>> I am working on segmenting water in the brain for simula research >>> laboratory. >>> >>> I am using the command >>> "vmtklevelsetsegmentation -ifile image_volume_voi.vti -levelsetsfile >>> level_sets.vti -ofile level_setsOut.vti" >>> to continue working on a project. >>> >>> what I would really like to be able to do is to make multiple >>> levelsets >>> files and then combine them. Like this; >>> >>> vmtklevelsetsegmentation -ifile image_volume_voi.vti -levelsetsfile >>> level_sets.vti -levelsetsfile level_sets2.vti -ofile >>> level_setsOut.vti >>> >>> is it possible to do this in the vmtk software? or possible to add >>> it? >>> >>> Adrian Hope >>> >>> ------------------------------------------------------------------------------ >>> Everyone hates slow websites. So do we. >>> Make your web apps faster with AppDynamics >>> Download AppDynamics Lite for free today: >>> http://p.sf.net/sfu/appdyn_d2d_mar [1] >>> _______________________________________________ >>> vmtk-users mailing list >>> vmtk-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/vmtk-users >> >> >> >> Links: >> ------ >> [1] http://p.sf.net/sfu/appdyn_d2d_mar > > ------------------------------------------------------------------------------ > Own the Future-Intel(R) Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. Compete > for recognition, cash, and the chance to get your game on Steam. > $5K grand prize plus 10 genre and skill prizes. Submit your demo > by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 > _______________________________________________ > vmtk-users mailing list > vmtk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/vmtk-users ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ vmtk-users mailing list vmtk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vmtk-users