C#
Objective-C
C++/CLI
Java
public DicomModule FindModule(
DicomModuleType module
)
- (nullable LTDicomModule *)findModule:(LTDicomModuleType)module NS_SWIFT_NAME(findModule(_:));
public DicomModule findModule(DicomModuleType module)
public:
DicomModule^ FindModule(
DicomModuleType module
)
module
The module to find.
A DicomModule object that contains information about the specified module, or a null reference (Nothing in VB) if the specified module was not found. The DicomModule object returned by this method is not unique. It will be overwritten by subsequent calls to FindModule.
The DicomModule object returned by this method is not unique. It will be overwritten by subsequent calls to FindModule.
To find the module at a specific index use FindModuleByIndex.
using Leadtools;
using Leadtools.Dicom;
public void DicomModuleSample()
{
//Make sure to initialize the DICOM engine, this needs to be done only once
//In the whole application
DicomEngine.Startup();
using (DicomDataSet dicomDataset = new DicomDataSet())
{
dicomDataset.Initialize(DicomClassType.DXImageStoragePresentation, DicomDataSetInitializeType.ExplicitVRLittleEndian);
dicomDataset.DeleteModule(DicomModuleType.Patient);
dicomDataset.InsertModule(DicomModuleType.Patient, false);
DicomModule module = dicomDataset.FindModule(DicomModuleType.Patient);
Debug.Assert(module != null);
bool found = false;
for (int i = 0; i < dicomDataset.ModuleCount; i++)
{
module = dicomDataset.FindModuleByIndex(i);
if (module.Type == DicomModuleType.Patient)
{
found = true;
}
}
Debug.Assert(found);
}
DicomEngine.Shutdown();
}