Error processing SSI file
LEADTOOLS Medical (Leadtools.Dicom assembly)

Show in webframe

RemoveType3EmptyElements Method








Deletes type 3 empty elements from the dataset
Syntax
public bool RemoveType3EmptyElements()
'Declaration
 
Public Function RemoveType3EmptyElements() As Boolean
'Usage
 
Dim instance As DicomDataSet
Dim value As Boolean
 
value = instance.RemoveType3EmptyElements()
public bool RemoveType3EmptyElements()
 function Leadtools.Dicom.DicomDataSet.RemoveType3EmptyElements()
public:
bool RemoveType3EmptyElements(); 

Return Value

true if the function was able to traverse the dataset and maybe removed some items. false if there was a problem identifying the dataset IOD class, or if the IOD class was unknown.
Remarks
You can remove empty items to save space and minimize the dataset size before sending it.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Dicom

<TestMethod()> _
Public Sub Test_DicomDataSet_RemoveType3EmptyElementsSample()
    'Make sure to initialize the DICOM engine, this needs to be done only once 
    'In the whole application
    DicomEngine.Startup()

    Dim dicomDataset As DicomDataSet = New DicomDataSet()
    Using (dicomDataset)

        dicomDataset.Initialize(DicomClassType.DXImageStoragePresentation, DicomDataSetInitializeType.ExplicitVRLittleEndian)
        dicomDataset.RemoveType3EmptyElements()
    End Using

    DicomEngine.Shutdown()
End Sub
using Leadtools;
using Leadtools.Dicom;

[TestMethod]
public void Test_DicomDataSet_RemoveType3EmptyElementsSample()
{
   //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.RemoveType3EmptyElements();
   }
   DicomEngine.Shutdown();
}
Requirements

Target Platforms

See Also

Reference

DicomDataSet Class
DicomDataSet Members
DeleteElement Method
Reset Method
GetFirstElement Method
GetLastElement Method
GetPreviousElement Method
GetNextElement Method
GetRootElement Method
GetParentElement Method
GetChildElement Method
FindFirstElement Method
FindLastElement Method
FindPreviousElement Method
FindNextElement Method
FindModule Method
FindModuleByIndex Method
InsertModule Method

Error processing SSI file
Leadtools.Dicom requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features