public DicomElement CreatePrivateCreatorDataElement(
DicomElement element,
int elementGroup,
int elementNumber,
string idCode
)
public DicomElement createPrivateCreatorDataElement(DicomElement element, int elementGroup, int elementNumber, String idCode)
public:
DicomElement^ CreatePrivateCreatorDataElement(
DicomElement^ element,
int elementGroup,
int elementNumber,
String^ idCode
)
element
A DicomElement in the data set. The Private Creator Data Element will be inserted at the same level as this item.
elementGroup
Group number of the private creator data element.
elementNumber
Element number of the private creator data element.
idCode
String identifier that is assigned to the private creator data element.
The newly inserted Private Creator Data Element.
This feature is available in version 16 or higher.
A DICOM Data Set can have private data which is stored in private tags. Private tags are reserved by adding a Private Creator Data Element to the data set. Elements of the form (gggg,0010-00FF) represent private creator data elements. More specifically:
Private Creator Data Elements are elements of the form (gggg,eeee) where:
A private creator data element of the form (gggg,00ee) reserves the following 256 elements, which can be of any value representation:
For example, suppose you want to add the following three private elements to a DICOM data set:
You would first reserve the elements by adding the corresponding private creator data element (0017, 0012).
When using CreatePrivateCreatorDataElement, the created private creator data element is on the same level as element. If element is null, the private creator data element is created at the top or first level.
If parameter uElementNumber is 0xFFFF, the private creator data element is created with the first available element number in group elementGroup.
This example shows the steps to properly reserve and insert some private tags 1. Reserve elements by first creating a 'Private Creator Data Element'-- create in group 'uGroup', and take first available element 2. Now insert five private elements that have been reserved by the 'Private Creator Data Element'
using Leadtools;
using Leadtools.Dicom;
public void DicomDataSet_CreatePrivateCreatorDataElement(DicomDataSet ds, DicomElement root, int elementGroup)
{
int tag = 0;
string sUniqueID = "MyPrivateCreatorDataElement";
// We will add some private tags
// First see if the Private Creator Data Element already exists -- search by unique ID, ANY group
DicomElement privateCreatorElement = ds.FindFirstPrivateCreatorDataElement(root, true, sUniqueID, 0);
// If the Private Creator Data Element does not exist, try to create it
if (privateCreatorElement == null)
{
privateCreatorElement = ds.CreatePrivateCreatorDataElement(root, elementGroup, 0xFF, sUniqueID);
if (privateCreatorElement == null)
return;
// Private Creator Data Element tag was created successfully
// Add it to the DICOM Tag table
DicomTagTable.Instance.Insert(
privateCreatorElement.Tag,
0xFFFFFFFF,
sUniqueID,
privateCreatorElement.VR,
1, 1, 1
);
}
// Insert some private elements
for (int i = 0; i < 5; i++)
{
tag = ds.GetNextUnusedPrivateTag(privateCreatorElement);
DicomElement p = ds.InsertElement(root, false, tag, DicomVRType.IS, false, 0);
if (p != null)
{
ds.SetIntValue(p, new int[] { i }, 1);
}
}
}
CreatePrivateCreatorDataElement Method
GetNextUnusedPrivateTag Method
FindFirstPrivateCreatorDataElement Method
FindNextPrivateCreatorDataElement Method
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document