public int GetNextUnusedPrivateTag(
DicomElement privateCreatorDataElement
)
public int getNextUnusedPrivateTag(DicomElement privateCreatorDataElement)
public:
int GetNextUnusedPrivateTag(
DicomElement^ privateCreatorDataElement
)
privateCreatorDataElement
Private Creator Data Element
The next unused private tag.
This feature is available in version 16 or higher.
This method is used together with any of the following functions:
to create private elements in a DICOM data set. For more information on private elements, see CreatePrivateCreatorDataElement.
Use this method with an existing private creator data element to create private elements. If successful, the return value will be the next available unused tag that has been reserved by the Private Creator Data Element
For example, suppose the following tags exist in a DICOM data set:
After a successful call to GetNextUnusedPrivateTag, the return value is 0x00171202, which can be used with InsertElement to add a new private 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