is it possible to add privateCreator parameter for 2 static methods DcmItem::newDicomElement ?
for example
static DcmElement *newDicomElement(const DcmTagKey &tag, const char *privateCreator = NULL)
....
{
DcmTag temp(tag, privateCreator);
....
currently it is not possible to use this method to create private elements
thanks!
=========================================
--- a/dcmdata/include/dcmtk/dcmdata/dcitem.h
+++ b/dcmdata/include/dcmtk/dcmdata/dcitem.h
@@ -1213,20 +1213,21 @@ class DCMTK_DCMDATA_EXPORT DcmItem
/** creates new DICOM element from given attribute tag.
* @param tag attribute tag of the element to be created.
+ * @param privateCreator attribute private creator of the element
* @return pointer to newly created element returned in this parameter upon success,
* NULL pointer otherwise
*/
- static DcmElement *newDicomElement(const DcmTagKey &tag);
+ static DcmElement *newDicomElement(const DcmTagKey &tag, const char *privateCreator = NULL);
/** creates new anew DICOM element from given attribute tag.
* @param newElement Pointer to newly created element returned in this parameter upon success,
* NULL pointer otherwise
* @param tag attribute tag of the element to be created.
- * @param length attribute value length of the element to be created
+ * @param privateCreator attribute private creator of the element
* @return EC_Normal upon success, an error code otherwise
*/
static OFCondition newDicomElement(DcmElement *&newElement,
- const DcmTagKey &tag);
+ const DcmTagKey &tag, const char *privateCreator = NULL);
protected:
--- a/dcmdata/libsrc/dcitem.cc
+++ b/dcmdata/libsrc/dcitem.cc
@@ -4195,9 +4195,9 @@ OFCondition DcmItem::convertToUTF8()
// ********************************
-DcmElement* DcmItem::newDicomElement(const DcmTagKey& tag)
+DcmElement* DcmItem::newDicomElement(const DcmTagKey& tag, const char *privateCreator)
{
- DcmTag temp(tag);
+ DcmTag temp(tag, privateCreator);
DcmElement* elem = NULL;
OFBool readAsUN = OFFalse;
newDicomElement(
@@ -4211,9 +4211,9 @@ DcmElement* DcmItem::newDicomElement(const DcmTagKey& tag)
OFCondition DcmItem::newDicomElement(DcmElement*& newElement,
- const DcmTagKey& tag)
+ const DcmTagKey& tag, const char *privateCreator)
{
- DcmTag temp(tag);
+ DcmTag temp(tag, privateCreator);
newElement = NULL;
OFBool readAsUN = OFFalse;
return newDicomElement(
DcItem::newDicomElement for private tags
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DcItem::newDicomElement for private tags
Hi,
that should be no problem.
Could you write a patch for the current git version? (there have been recent changes for newDicomElement()).
Best,
Michael
that should be no problem.
Could you write a patch for the current git version? (there have been recent changes for newDicomElement()).
Best,
Michael
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DcItem::newDicomElement for private tags
Thank you; I'll have a look and post an update.
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: DcItem::newDicomElement for private tags
Hi Shaeto,
I committed the patch today to DCMTK. The related commit #26750f will show up in the next days on the public git.
Thanks for the suggestion,
Michael
I committed the patch today to DCMTK. The related commit #26750f will show up in the next days on the public git.
Thanks for the suggestion,
Michael
Who is online
Users browsing this forum: Google [Bot] and 1 guest