Re:removal of private tags
Moderator: Moderator Team
-
- Posts: 19
- Joined: Fri, 2006-12-08, 10:49
- Contact:
Re:removal of private tags
hello,
Is there any function in dcmtk by which we can remove some of the private tags from a DICOM image?? any help on this would be greatly appreciated. Thanking you.
Is there any function in dcmtk by which we can remove some of the private tags from a DICOM image?? any help on this would be greatly appreciated. Thanking you.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- DCMTK Developer
- Posts: 2052
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
just a note to Jörg's answer: We need that functionality for another project in the past. I added a (really short) howto (including code) to our public DCMTK wiki how you can remove all private data from a DICOM dataset.
Regards,
Michael
just a note to Jörg's answer: We need that functionality for another project in the past. I added a (really short) howto (including code) to our public DCMTK wiki how you can remove all private data from a DICOM dataset.
Regards,
Michael
-
- Posts: 19
- Joined: Fri, 2006-12-08, 10:49
- Contact:
When i execute the below piece of code the the status in the romoveallprivatetags function returns "Tag not found" but the image contains many private tags.. Can u help me with this?? have i done any mistake whil executing the below code??
DcmFileFormat fileformat;
DcmItem dset;
//Loading DICOM Files
OFCondition status = fileformat.loadFile(DicomFilename);
if(status.good())
{
removeAllPrivateTags(dset);
}
DcmFileFormat fileformat;
DcmItem dset;
//Loading DICOM Files
OFCondition status = fileformat.loadFile(DicomFilename);
if(status.good())
{
removeAllPrivateTags(dset);
}
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Did you simply forget to set the value of "dset"? Use fileformat.getDataset() as described in the documentation ...
-
- Posts: 19
- Joined: Fri, 2006-12-08, 10:49
- Contact:
-
- Posts: 19
- Joined: Fri, 2006-12-08, 10:49
- Contact:
I managed to delete the private tag and save it as fileformat.savefile() but i can only do it with naming it with a different filename. How can i copy the dataset and save it with the same file name as before?? (i.e) if the old file name is 1.dcm i need to save it as 1.dcm and not by any other file name.
Thanking you
Thanking you
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 19
- Joined: Fri, 2006-12-08, 10:49
- Contact:
Who is online
Users browsing this forum: Bing [Bot] and 1 guest