Dear Joao,
thanks for your interest in vmtk.
As for the meta image file format: as you know, the meta image
(meta) format allows for raw data to be specified in a different file (e.g.
.raw)
or embedded in the same file (.mha). By convention, inherited from ITK,
vmtk assumes that a meta image file with .mha extension has data embedded
in the same file, while a meta image file with .mhd extension has the
data in a separate file.
In your case it looks like you have a file with .mha extension, but then
the data is in a .raw file. Try changing the extension to .mhd and read with
vmtk
vmtkimageviewer -ifile 26fr1.mhd
and see what happens.
Related to your second question, all vmtk classes are sublcasses of VTK
classes, and in addition vmtk has Python wrapping on by default. In fact
the above command triggers the Python interpreter to execute code.
So, vmtk can be definitely used alongside VTK in a Python program.
To see how the centerlines code can be used from Python, take a look
at this:
https://github.com/vmtk/vmtk/blob/master/vmtkScripts/vmtkcenterlines.py
In order to find out how to compute centerlines with your geometry the
best way to go is to read the centerlines tutorial on vmtk.org and try them
out on your geometry. Keep in mind that centerline seeds can be specified
using physical space coordinates, which might be handy in your case.
Hope this helps
Luca
On May 22, 2012, at 8:57 AM, João Domingos wrote:
> Dear Luca and all,
>
> I was looking for a way in python to calculate the centreline of my 3D
> surfaces and could not find anything wrapped in python (only c++
> algorithms), therefore I am a new vmtk user.
>
> My datasets consist of several 3D ultrasound volumes in metafile: each
> with one .mha (example attached) and one .raw. Using vtk I first split
> each volume in its slices: in the example .mha with DimSize = 272 256
> 208, I split my volume in 208 frames. Thereafter, in vtk again, I just
> read these frames (whole volume) with the vtk.vtkImageReader2(). The
> function that does this is attached and working perfectly. Question:
> how can read my volume (.mha and .raw) files to vmtk? I have not been
> able to do it so far..
>
> With vtk, I obtain a surface which I get with
> vtk.vtkSurfaceReconstructionFilter() and then vtk.vtkContourFilter().
> Question: can vmtk be run in the same python file of (along with) vtk?
> If yes, how can I use the vmtkcenterlines and probably the
> vmtksurfacereader to calculate the centre line of my models? my models
> are simple, they are like big elipses (always closed in a convex set),
> so calculating the centreline should be simple. IF I cannot run vmtk
> along with vtk, what do you advise me to do, so I can extract the
> centreline with vmtk?
>
> Your help would be really appreciated!
>
> Many thanks.
> Best regards,
> Joao Domingos
> <us3D.py><26fr1.mha>------------------------------------------------------------------------------
> 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