Hi cq,
the fact that python crashes is not normal, and very likely you won't solve
your problem by using the C++ directly.
You may want to first try out the both possible ways of reading DICOM files in
vmtk:
the first is
vmtkimagereader -f dicom -d directory_with_dicom_files_in_it
and the other is
vmtkimagereader -ifile first_dicom_file_in_your_series.dcm
The first uses vtkvmtkDICOMImageReader, while the second uses the ITK I/O
mechanisms (which rely on GDCM, a dicom library).
In any case, using a class from vmtk in C++ is no different than using a VTK
class from C++, since all vmtk classes are derived from VTK.
For the parameters to set, you can directly refer to how they are used in
vmtkimagereader.py.
In order to bulid against vmtk, just include the VMTKUse.cmake file that is in
the bulid directory (or in the install directory) in your CMakeLists.txt
file to successfully compile against vmtk. If you don't know about CMake or
VTK, please refer to the relative manuals and mailing lists.
Let me know if you need further directions
Luca
On Nov 12, 2010, at 5:48 PM, ququ wrote:
> Hi Luca,
> Could you please provide some c++ test classes for your c++ code? Now
> I try to read some dicom images using vmtkimagereader, python crashes every
> time. I want to use c++ code to call vtkvmtkDICOMImageReader directly.
> Thanks a lot.
>
> Regards,
> -cq
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users