Hi Anna, if Slicer loads the images right, then I'd expect vmtk to do the same since they rely on the same code for estimating positioning and directions. There must be something we're still missing from the picture.
Quick question: how did you load the DICOM images initially, when you segmented them? Using vmtkimagereader -f dicom -d your_directory (old way that I should deprecate) or vmtkimagereader -ifile first_dicom_file_in_series.dcm ? Thanks Luca On Jul 16, 2012, at 7:12 PM, Hoppe, Anna L wrote: > Hi Luca, > > I tried out the sequence of vmtk scripts you mentioned (vmtkimagereader > -ifile 0001_0001.dcm --pipe vmtksurfacetransformtoras -ifile > segmented_surface.vtp -ofile transformed_segmented_surface.vtp). The > resulting transformed surfaces were still misaligned. After looking at the > dicom header files for each volumetric dataset, there is a coordinate > position archived under the name "Image position (patient)" that differs in > the two datasets, I think that this may be what you referred to as the > "patient's coordinate space"; however, when I load these same two image sets > in 3DSlicer and generate surface models within this program these models are > aligned perfectly. So, I know that the two image sets share the same > physical coordinate space, it's just that the two only partially overlap > within that same physical space (with the overlapping region being what I'm > interested in). 3DSlicer is apparently using some info. from each dicom > header file in order to generate aligned surfaces, I'm just not sure what > info. (after having parsed the header and taking a look at the archived data > within -- there doesn't seem to be any image location coordinates other than > the "image location (patient)" archive?). So I am wondering if it's > possible, assuming I find out some info. about the physical coordinate system > my datasets share, to pass this info. onto vmtksurfaceviewer, or would a > program like 3DSlicer be my only option for model generation for now? > > Thanks for your help. It is greatly appreciated. > Anna > ________________________________________ > From: Luca Antiga [luca.ant...@orobix.com] > Sent: Saturday, July 14, 2012 9:03 AM > To: Hoppe, Anna L > Cc: vmtk-users@lists.sourceforge.net > Subject: Re: [vmtk-users] vmtk spatial location question > > Dear Anna, > > vmtk doesn't natively take into account image orientation yet. It has been in > the wishlist for some time now, but it would require quite some work, > hopefully I'll be able to get it done if there's enough interest in it. > > For the time being, you can recover the original orientation by transforming > the segmented surfaces to their respective patient's coordinate space: > > vmtkimagereader -ifile 0001_0001.dcm --pipe vmtksurfacetransformtoras -ifile > segmented_surface.vtp -ofile transformed_segmented_surface.vtp > > Note that you have to start from your original dicom series in the > vmtkimagereader, since the transform matrix is taken from there. > > You should do this for both surfaces, and they should align at the end *if* > the two patient reference frames where the same (which doesn't depend > on vmtk, of course). > > If they aren't (you can load the images up in, say, Osirix, and check if the > two series overlap), then you'll have to perform image registration first. > To this end you could use 3DSlicer, it incorporates quite a few registration > algorithms. > > Hope this helps. > > > Luca > > > > > On Jul 12, 2012, at 9:34 PM, Hoppe, Anna L wrote: > >> Hi VMTK users, >> >> I have two volumetric image sets taken at the same time point with slightly >> different patient locations (according to the dicom header files). One is a >> bone scan and the other is a contrast-enhanced vessel scan. When loading >> these two data sets using vmtkimageviewer, vmtk assumes that they share the >> same patient position and therefore share the same origin. Consequently when >> the vessel and bone scans are segmented, they are clearly misaligned. Does >> vmtk assume the same patient position when overlaying any two image sets >> (the sets share the same number of pixel rows and columns and number of >> images (512x512x512); additionally, they have the same pixel spacing)? Is >> there a way to explicitly give vmtkimagereader the patient position of each >> image set, so that the corresponding segmentations will be aligned? >> >> Thank you for your help, >> Anna >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> vmtk-users mailing list >> vmtk-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/vmtk-users > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > vmtk-users mailing list > vmtk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/vmtk-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ vmtk-users mailing list vmtk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vmtk-users