I want to use DCMTK in my application.
To start with I have taken the following code --
Code: Select all
DcmFileFormat fileformat;
OFCondition status = fileformat.loadFile("test.dcm");
if (status.good())
{
OFString patientName;
if (fileformat.getDataset()->findAndGetOFString(DCM_PatientName, patientName).good())
{
cout << "Patient's Name: " << patientName << endl;
} else
cerr << "Error: cannot access Patient's Name!" << endl;
} else
cerr << "Error: cannot read DICOM file (" << status.text() << ")" << endl;
I would be thankful if you could tell me which files to include (#include)
and exact steps for compilation on linux ubuntu.
Thanks in advance...