addDicomFile
Moderator: Moderator Team
addDicomFile
function return ilegal parameter :
status= dicomdir.addDicomFile("ALBINA2.dcm");
How do I resolve that?
status= dicomdir.addDicomFile("ALBINA2.dcm");
How do I resolve that?
-
- OFFIS DICOM Team
- Posts: 1459
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
adddicomfile
I only repeat your example below but it return ilegal parameter in addDicomFile("albina2.dcm").
Do I have to create any application profile or to change ?.If I am writing made a mistake, the more important. How do I resolve this problem.
I am a long time in this problem. help me please!
DicomDirInterface dicomdir;
OFCondition status = dicomdir.createNewDicomDir();
if (status.good())
{
while ( /* there are files */ )
status =dicomdir.addDicomFile( /* current filename */ );
cout<<status.text();
status = dicomdir.writeDicomDir();
if (status.bad())
cerr << "Error: cannot write DICOMDIR (" << status.text() << ")" << endl;
} else
cerr << "Error: cannot create DICOMDIR (" << status.text() << ")" << endl;
Do I have to create any application profile or to change ?.If I am writing made a mistake, the more important. How do I resolve this problem.
I am a long time in this problem. help me please!
DicomDirInterface dicomdir;
OFCondition status = dicomdir.createNewDicomDir();
if (status.good())
{
while ( /* there are files */ )
status =dicomdir.addDicomFile( /* current filename */ );
cout<<status.text();
status = dicomdir.writeDicomDir();
if (status.bad())
cerr << "Error: cannot write DICOMDIR (" << status.text() << ")" << endl;
} else
cerr << "Error: cannot create DICOMDIR (" << status.text() << ")" << endl;
-
- DCMTK Developer
- Posts: 117
- Joined: Tue, 2004-11-02, 17:21
- Location: Oldenburg, Germany
- Contact:
addDicomFile
I tried to do that(put "albina2") but it return: No such file or directory, and I already used this same form("albina2.dcm") in other program and it always functions.
What are the other suggestions ?.
thanks !
What are the other suggestions ?.
thanks !
AddDicomFile
I tried to do that. with: "albina2.dcm" and "albina2". In the first case it return ilegal parameter and second it return No such file or directory.
What do I do?.
Thanks a lot for help me!.
DicomDirInterface dicomdir;
OFCondition status = dicomdir.createNewDicomDir();
if (status.good())
{
status =dicomdir.addDicomFile( "albina2");
cout<<status.text();
status = dicomdir.writeDicomDir();
if (status.bad())
cerr << "Error: cannot write DICOMDIR (" << status.text() << ")" << endl;
} else
cerr << "Error: cannot create DICOMDIR (" << status.text() << ")" << endl;
What do I do?.
Thanks a lot for help me!.
DicomDirInterface dicomdir;
OFCondition status = dicomdir.createNewDicomDir();
if (status.good())
{
status =dicomdir.addDicomFile( "albina2");
cout<<status.text();
status = dicomdir.writeDicomDir();
if (status.bad())
cerr << "Error: cannot write DICOMDIR (" << status.text() << ")" << endl;
} else
cerr << "Error: cannot create DICOMDIR (" << status.text() << ")" << endl;
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Please make sure that the name of the DICOM file you want to add (i.e. the one which is stored on your harddisk) is "albina2" and not "albina2.dcm" - this is what wrgben pointed out. Btw, lower case characters are also not allowed for the filenames on DICOM storage media. Of course, you could use enableMapFilenamesMode() to enable the automatic filename mapping.
Anyway, I would recommend that you first read the relevant parts of the DICOM standards before trying to create a DICOMDIR.
Anyway, I would recommend that you first read the relevant parts of the DICOM standards before trying to create a DICOMDIR.
AddDicomdirFile
I don't know if I understand but you want I remove the .dcm extension from the file stored in harddisk?.If it was that, I did and the it return Storage media application profile violated. Did it almost perform correctly?.
if not . I hope that you continue help me!.
thanks.
if not . I hope that you continue help me!.
thanks.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
It seems that the file you want to add does not conform to the requirements of the selected application profile (which is STD-GEN-CD by default). You could use setLogStream() to get more information on the problem or try the command line tool dcmgpdir/dcmmkdir which use the same class.
Who is online
Users browsing this forum: No registered users and 0 guests