←Select platform

DicomAutoScaleDataFlags Enumeration

Summary

Specifies the type of DicomAutoScaleData returned with a call to GetAutoScaleData.

Syntax
C#
C++/CLI
public enum DicomAutoScaleDataFlags 
public: 
   enum class DicomAutoScaleDataFlags sealed 
Members
ValueMemberDescription
0NoneNone
1AutoScaleSlopeIntercept DicomAutoScaleData contains the autoscale slope and autoscale intercept if the DICOM pixel data has been autoscaled.
2InverseModalityLutDicomAutoScaleData defines a linear transformation that is the inverse of the linear transformation specified in the DicomDataSet
Remarks

For more information, see the GetAutoScaleData(DicomAutoScaleDataFlags) method.

Example
C#
using Leadtools; 
using Leadtools.Dicom; 
 
 
///      
public void Test_DicomDataSet_GetAutoScaleData() 
{ 
   DicomEngine.Startup(); 
   string dicomFileName = Path.Combine(LEAD_VARS.ImagesDir, "DICOM", "image3.dcm"); 
   using (DicomDataSet ds = new DicomDataSet()) 
   { 
      ds.Load(dicomFileName, DicomDataSetLoadFlags.None); 
      DicomElement element = ds.FindFirstElement(null, DicomTag.PixelData, true); 
 
      // Get the image and apply autoscaling 
      ds.GetImage(element, 0, 0, RasterByteOrder.Gray, DicomGetImageFlags.AutoScaleModalityLut | DicomGetImageFlags.AutoScaleVoiLut | DicomGetImageFlags.AutoApplyModalityLut | DicomGetImageFlags.AutoApplyVoiLut); 
 
      // 1. Use the overload that takes not arguments 
      DicomAutoScaleData data = ds.GetAutoScaleData(); 
      DumpAutoScaleData("GetAutoScaleData()", data); 
 
      // 2. Use the overload that takes arguments, and pass 'DicomAutoScaleDataFlags.AutoScaleSlopeIntercept' 
      //    Note that this gives the same result as (1) 
      data = ds.GetAutoScaleData(DicomAutoScaleDataFlags.AutoScaleSlopeIntercept); 
      DumpAutoScaleData("GetAutoScaleData(DicomAutoScaleDataFlags.AutoScaleSlopeIntercept)", data); 
 
      // 3. Use the overload that takes arguments, and pass 'DicomAutoScaleDataFlags.InverseModalityLut' 
      data = ds.GetAutoScaleData(DicomAutoScaleDataFlags.InverseModalityLut); 
      DumpAutoScaleData("GetAutoScaleData(DicomAutoScaleDataFlags.InverseModalityLut)", data); 
   } 
   DicomEngine.Shutdown(); 
} 
 
void DumpAutoScaleData(string title, DicomAutoScaleData data) 
{ 
   string message = string.Format("IsAutoScaled: {0}\nAutoScaleSlope: {1}\nAutoScaleIntercept: {2}", 
      data.IsAutoScaled, 
      data.AutoScaleSlope, 
      data.AutoScaleIntercept); 
 
   Console.WriteLine($"{title}: {message}"); 
} 
///  
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

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

Leadtools.Dicom Assembly