[Resolved] Dataset Clear method fails

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mlhostis
Posts: 5
Joined: Tue, 2005-05-10, 12:19

[Resolved] Dataset Clear method fails

#1 Post by mlhostis »

Hello,

I'm trying to load a dicom file.

When I load a first file, it succeeds.
But when I load a second file and get elements from the dataset, I get
elements of the first file dataset.

So I called the clear method on my DcmFileFormat object before calling
the loadFile method for the second time but the clear method always
return failure.

Could somebody help me ?

Regards,

Morgan
Last edited by mlhostis on Tue, 2005-05-10, 13:47, edited 1 time in total.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

DcmFileFormat::clear() always returns EC_IllegalCall. Why don't you just create a new DcmFileFormat object for the second file?

mlhostis
Posts: 5
Joined: Tue, 2005-05-10, 12:19

#3 Post by mlhostis »

Jörg Riesmeier wrote:Why don't you just create a new DcmFileFormat object for the second file?
I could.
I haven't done it for the moment because I'm storing my DcmFileFormat object in a member variable and not in a pointer.

I thought using clear method would have been a better solution.

So I'm going to use a pointer and creating a new DcmFileFormat object.

Thanks for your help.

Morgan

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest