[Insight-users] DICOM GetPatientName error

Luis Ibanez luis.ibanez at kitware.com
Wed Oct 6 23:15:23 EDT 2004


Hi Iceberg,

Please do the following:

1) Try the Example:

     Insight/Examples/IO/
       DicomPrintPatientInformation.cxx

    with your dataset.


2) Make sure that you are allocating
    memory for the variable in which
    you are returning the patient name.

    The error message that you get suggests
    that you are passing a pointer without
    memory allocated as the space where the
    patient name will be stored.


Please take a look at the code of the
example in numeral (1), that should guide
you in the process of using the same
functionality in your application.

Please let us know if you have further
questions.


    Thanks


      Luis




----------------------
iceberg wrote:

> Hi,
>    I've read the message of "Using ITK with DICOM - extracting
> non-image information"
> (URL: http://public.kitware.com/pipermail/insight-users/2004-August/010162.html).
> And I checked out the latest itk source from cvs and rebuild it, but
> still I got the same problem when I called the function
> GetPatientName(char*), the compiler reported that "Access
> violation...". My environment is VC7.1, and when I debugged the
> project, I could see the protected member variable of
> DicomAppHelper.cxx m_PatientName had got the correct value, but the
> project crash
> at function GetPatientName. I don't know why, can anybody give me a
> hint? Thanks very much.






More information about the Insight-users mailing list