←Select platform

NumberOfEntries Property

Summary
Gets or sets the number of entries in the lookup table.
Syntax
C#
Objective-C
C++/CLI
Java
public int NumberOfEntries { get; set; } 
@property (nonatomic, assign) NSUInteger numberOfEntries; 
public int getNumberOfEntries() 
public void setNumberOfEntries(int value) 
public: 
property int NumberOfEntries { 
   int get(); 
   void set (    int value); 
} 

Property Value

Value indicating the first value in the "LUT Descriptor". Specifies the number of entries in the lookup table.

Remarks
  • This property specifies the attributes of "LUT Descriptor" (0028,3002) element under the "Modality LUT Sequence" (0028,3000).
Example
C#
using Leadtools; 
using Leadtools.Dicom; 
 
 
public void TestVoiLut() 
{ 
   string dicomFileName = Path.Combine(LEAD_VARS.ImagesDir, "DICOM", "IMAGE3.dcm"); 
   //Make sure to initialize the DICOM engine, this needs to be done only once  
   //In the whole application 
   DicomEngine.Startup(); 
   using (DicomDataSet ds = new DicomDataSet()) 
   { 
      int VoiLutSize = 65536; 
 
      //Load DICOM File 
      ds.Load(dicomFileName, DicomDataSetLoadFlags.None); 
      ds.DeleteVoiLut(); 
 
      DicomVoiLutAttributes VoiLutAttributes = new DicomVoiLutAttributes(); 
      VoiLutAttributes.FirstStoredPixelValueMapped = 0; 
      VoiLutAttributes.EntryBits = 16; 
      VoiLutAttributes.NumberOfEntries = VoiLutSize; 
 
      int[] LutData = new int[VoiLutSize]; 
      for (int i = 0; i < VoiLutSize; i++) 
      { 
         LutData[i] = i; 
      } 
      ds.SetVoiLut(0, VoiLutAttributes, LutData); 
 
      DicomVoiLutAttributes attributes = ds.GetVoiLut(0); 
      if (attributes != null) 
      { 
         Debug.Assert(attributes.FirstStoredPixelValueMapped == 0); 
         Debug.Assert(attributes.EntryBits == 16); 
         Debug.Assert(attributes.NumberOfEntries == VoiLutSize); 
 
         int[] data = ds.GetVoiLutData(0); 
         // Do something with the data 
      } 
      ds.Save(Path.Combine(LEAD_VARS.ImagesDir, "DICOM", "VOILut.dcm"), DicomDataSetSaveFlags.None); 
 
   } 
   DicomEngine.Shutdown(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.1.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.