public DicomElement FindFirstPrivateCreatorDataElement(
DicomElement element,
bool tree,
string idCode,
int elementGroup
)
public DicomElement findFirstPrivateCreatorDataElement(DicomElement element, boolean tree, String idCode, int elementGroup)
public:
DicomElement^ FindFirstPrivateCreatorDataElement(
DicomElement^ element,
bool tree,
String^ idCode,
int elementGroup
)
element
A DicomElement in the data set. The search for Private Creator Data Elements will be at the same level as as this item.
tree
true to evaluate the Data Set as a tree; false to evaluate the Data Set as a list.
idCode
String identifier that is assigned to the private creator data element. If non-null, search includes only those Private Creator Data Elements that have a string value that is the same as idCode. If null, search includes Private Creator Data Elements with any string value.
elementGroup
Group number to search within. If elementGroup is 0, search includes Private Creator Data Elements with any group. If elementGroup is 0x0010 to 0x00FF, the search includes only those Private Creator Data Elements in elementGroup.
The first Private Creator Data Element that matches the search constraints. If null is returned, no item exists with the specified search constraints.
This feature is available in version 16 or higher.
Use this method along with FindNextPrivateCreatorDataElement to find any or all the Private Creator Data Elements in a DICOM data set. The search for private creator data elements is on the same level as the parameter element. If element is null, the search is at the top or first level.
If tree is true, the data set is searched as a tree. If tree is false, the data set is searched as a list. For more information on the use of this parameter, see FindFirstElement.
This example displays all the Private Creator Data Elements and corresponding private elements in a data set.
using Leadtools;
using Leadtools.Dicom;
string DumpElement(DicomElement p)
{
if (p == null)
return string.Empty;
return string.Format("({0:X4},{1:X4})\n", p.Tag >> 0x10, p.Tag & 0xFFFF);
}
string DumpPrivateElements(DicomDataSet ds, DicomElement privateCreatorDataElement)
{
string sMsg = string.Empty;
DicomElement p = ds.FindFirstPrivateElement(privateCreatorDataElement);
while (p != null)
{
sMsg = sMsg + "\t" + DumpElement(p);
p = ds.FindNextPrivateElement(p, privateCreatorDataElement);
}
return sMsg;
}
void DicomDataSet_FindFirstPrivateCreatorDataElementExample(DicomDataSet ds, DicomElement root, bool tree)
{
string sMsg = string.Empty;
DicomElement pPrivateCreatorDataElement = ds.FindFirstPrivateCreatorDataElement(root, tree, null, 0);
while (pPrivateCreatorDataElement != null)
{
sMsg = sMsg + "*** Private Creator Data Element" + DumpElement(pPrivateCreatorDataElement);
sMsg = sMsg + DumpPrivateElements(ds, pPrivateCreatorDataElement);
pPrivateCreatorDataElement = ds.FindNextPrivateCreatorDataElement(pPrivateCreatorDataElement, tree, null, 0);
}
Console.WriteLine($"Private Elements: {sMsg.ToString()}");
}
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