LEADTOOLS Image Processing (Leadtools.ImageProcessing.Core assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
ApplyLinearVoiLookupTableCommand Class
See Also  Members  
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. Supported in Silverlight, Windows Phone 7

Object Model

ApplyLinearVoiLookupTableCommand Class

Syntax

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

Example

Run the Leadtools.ImageProcessing.Core.ApplyLinearVoiLookupTableCommand on an image.

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

   Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "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)

End Sub

Public NotInheritable Class LEAD_VARS
   Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
C#Copy Code
public void ApplyLinearVoiLookupTableCommandExample()
   {
      // Load an image
      RasterCodecs codecs = new RasterCodecs();
      codecs.ThrowExceptionsOnInvalidImages = true;

      RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "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);

   }

static class LEAD_VARS
{
   public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
SilverlightCSharpCopy Code
public void ApplyLinearVoiLookupTableCommandExample(RasterImage image, Stream outStream)
{
   // 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);
   // Save result image
   RasterCodecs codecs = new RasterCodecs();
   codecs.Save(image, outStream, RasterImageFormat.Jpeg, 24);
   image.Dispose();
}
SilverlightVBCopy Code
Public Sub ApplyLinearVoiLookupTableCommandExample(ByVal image As RasterImage, ByVal outStream As Stream)
   ' 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(image)
   ' Save result image
   Dim codecs As RasterCodecs = New RasterCodecs()
   codecs.Save(image, outStream, RasterImageFormat.Jpeg, 24)
   image.Dispose()
End Sub

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: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also