Getting modality LUT data and attributes Example for VB.NET

'LEADDICOM1 is a DICOM Dataset defined outside this method
Private Sub GettingModalityLUTDataAndAttributes()
   ' This example will retrieve the LUT Data (0028,3006)
   ' under the Modality LUT Sequence (0028,3000)
   Dim Ret As Short
   ' Object that will hold modality LUT attributes
   Dim MLUTAttributes As LTDICLib.LModalityLUTAttributes
   ' Get modality LUT attributes
   Ret = LEADDICOM1.GetModalityLUTAttributes(0)
   If (Ret <> 0) Then
      MessageBox.Show("error")
      Exit Sub
   End If
   MLUTAttributes = LEADDICOM1.ModalityLUTAttributes
   ' If there is no modality LUT sequence then there is no data !
   If (MLUTAttributes.IsModalityLUTSequence = False) Then
      MessageBox.Show("No LUT")
      Exit Sub
   End If
   Dim Data As Object
   ' Retrieve the LUT Data (0028,3006)
   LEADDICOM1.GetModalityLUTData(Data, 0)
   ' Do something with the data
End Sub