Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ApplyLinearVoiLookupTableCommand Class
See Also  Members   Example 
Leadtools.ImageProcessing.Core Namespace : ApplyLinearVoiLookupTableCommand Class



Sets up the paint or paint and image processing methods window leveling options for a specific image through a linear transformation described by the window center and width. This class is available in the Document/Medical toolkits only.

Syntax

Visual Basic (Declaration) 
Public Class ApplyLinearVoiLookupTableCommand 
   Inherits RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As ApplyLinearVoiLookupTableCommand
C# 
public class ApplyLinearVoiLookupTableCommand : RasterCommand, IRasterCommand  
C++/CLI 
public ref class ApplyLinearVoiLookupTableCommand : public RasterCommand, IRasterCommand  

Example

Run the ApplyLinearVoiLookupTableCommand on an image.

Visual BasicCopy Code
Public Sub ApplyLinearVoiLookupTableCommandExample()
   RasterCodecs.Startup()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg")

   ' Prepare the command
   Dim command As ApplyLinearVoiLookupTableCommand = New ApplyLinearVoiLookupTableCommand
   command.Flags = VoiLookupTableCommandFlags.None
   command.Center = 330.0
   command.Width = 600.0
   ' Apply "Abdomen T1" window-level , high bit is assumed
   ' to be "11" and low bit "0.
   command.Run(leadImage)

   RasterCodecs.Shutdown()
End Sub
C#Copy Code
public void ApplyLinearVoiLookupTableCommandExample() 

   // Load an image 
   RasterCodecs.Startup(); 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg"); 
 
   // Prepare the command 
   ApplyLinearVoiLookupTableCommand command = new ApplyLinearVoiLookupTableCommand(); 
   command.Flags  = VoiLookupTableCommandFlags.None; 
   command.Center = 330.0; 
   command.Width  = 600.0; 
   // Apply "Abdomen T1" window-level , high bit is assumed  
   // to be "11" and low bit "0.  
   command.Run(image); 
 
   RasterCodecs.Shutdown(); 
}

Remarks

  • This class sets up the paint or paint and image processing methods window leveling options for a specific image through a linear transformation described by the window center and width. In the DICOM world, this is referred to as "applying a linear VOI LookupTable (LookupTable)".
  • This class will remap the LookupTable used to display and process an image by applying the linear transformation described by the window center and window width. In the DICOM world this is referred to as applying a "linear VOI LookupTable (LookupTable)". The DICOM standard states:
  • "Window Center and Window Width specify a linear conversion from stored pixel values (after any Modality LookupTable or Rescale Slope and Intercept specified in the IOD have been applied) to values to be displayed. Window Center contains the input value that is the center of the window. Window Width contains the width of the window." Please see "VOI LookupTable (LookupTable) Module Attributes" in the DICOM standard for more details.
  • This class does not change the image data; it only updates the entries inside the image LookupTable.
  • It's recommended to always set the VoiLookupTableCommandFlags.UpdateMinMax flag.
  • In the DICOM world you must set VoiLookupTableCommandFlags.ReverseOrder flag if the photometric interpretation of the image is "MONOCHROME1", where the minimum grayscale value is intended to be displayed as white after any VOI gray scale transformations have been performed.
  • This class supports 12 and 16-bit grayscale. Support for 12 and 16-bit grayscale is available only in the Document/Medical toolkits.
  • This command does not support 32-bit grayscale images.
For more information, refer to Changing Brightness and Contrast.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.Core.ApplyLinearVoiLookupTableCommand

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also