Hi to all,
i don't find a topic with it, so i'm sorry if there is one topic about it.
I have some errors when i try to compil dcmtk with qt 3.
1 - i create a qt application.
2 - i include osconfig.h and dctk.h.
3 - i try to compil and i have errors:
...
#error DCMTK needs stringstream or strstream type
...
#warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning
...
error: `assert' undeclared (first use this function)
...
../../dicom/include/ofstd/oflist.h:58:2: #error Your C++ compiler cannot handle class templates:
../../dicom/include/ofstd/oflist.h:498:2: #error Your C++ Compiler is not capable of compiling this code
...
#error "DCM_DICT_DEFAULT_PATH is not defined via osconfig.h
i think i have missed something but i don't find what.
Please could you help me?
Thank you for any help.
Nik
compiling dcmtk with qt and kdevelop on ubuntu.
Moderator: Moderator Team
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Hi,
thanks to Jörg and focus for your answers.
I have puted #define HAVE_CONFIG_H 1 on my classe and i don't have any errors messages (very good thanks).
Now when i uses this code in one of my functions:
when i try to compil it i have this error:
error: request for member `findAndGetOFString' in ` (&fileformat)->DcmFileFormat::getDataset()', which is of non-aggregate type `DcmDataset*'
I try many things but don't see what is missing.
Can help me another time please?
Thank you very much for your time.
Nik
thanks to Jörg and focus for your answers.
I have puted #define HAVE_CONFIG_H 1 on my classe and i don't have any errors messages (very good thanks).
Now when i uses this code in one of my functions:
Code: Select all
DcmFileFormat fileformat;
OFCondition status = fileformat.loadFile("test.dcm");
if (status.good())
{
OFString patientsName;
if (fileformat.getDataset().findAndGetOFString(DCM_PatientsName, patientsName).good())
{
cout << "Patient's Name: " << patientsName << endl;
} else
cerr << "Error: cannot access Patient's Name!" << endl;
} else
cerr << "Error: cannot read DICOM file (" << status.text() << ")" << endl;
error: request for member `findAndGetOFString' in ` (&fileformat)->DcmFileFormat::getDataset()', which is of non-aggregate type `DcmDataset*'
I try many things but don't see what is missing.
Can help me another time please?
Thank you very much for your time.
Nik
getDataset() returns a pointer to a DcmDataset. So you need to use the -> operator rather than the . operator:
Code: Select all
fileformat.getDataset()->findAndGetOFString(DCM_PatientsName, patientsName)
Who is online
Users browsing this forum: Majestic-12 [Bot] and 1 guest