ImageGear .NET v24.12 - Updated
CreateFromChannelSpec Method
Example 




ImageGear24.Formats.Dicom Assembly > ImageGear.Formats.DICOM Namespace > ImGearVOIWindow Structure : CreateFromChannelSpec Method
Depth of an image to which the Window transform will be applied.
Signed attribute of an image to which the Window transform will be applied.
Creates a VOI Window transform based on channel depth and signed attribute.
Syntax
'Declaration
 
Public Shared Function CreateFromChannelSpec( _
   ByVal inputDepth As Integer, _
   ByVal isSigned As Boolean _
) As ImGearVOIWindow
'Usage
 
Dim inputDepth As Integer
Dim isSigned As Boolean
Dim value As ImGearVOIWindow
 
value = ImGearVOIWindow.CreateFromChannelSpec(inputDepth, isSigned)
public static ImGearVOIWindow CreateFromChannelSpec( 
   int inputDepth,
   bool isSigned
)
public: static ImGearVOIWindow CreateFromChannelSpec( 
   int inputDepth,
   bool isSigned
) 
public:
static ImGearVOIWindow CreateFromChannelSpec( 
   int inputDepth,
   bool isSigned
) 

Parameters

inputDepth
Depth of an image to which the Window transform will be applied.
isSigned
Signed attribute of an image to which the Window transform will be applied.

Return Value

ImGearVOIWindow structure object.
Remarks
Transform is initialized according to minimum and maximum possible values of a signed or unsigned pixel.
Example
ImGearRasterPage rasterPage = (ImGearRasterPage)igPage;
ImGearDICOMDisplaySettings dicomDisplaySettings = rasterPage.DICOMDisplaySettings as ImGearDICOMDisplaySettings;
if (dicomDisplaySettings != null && dicomDisplaySettings.VOI == null)
{
    dicomDisplaySettings.VOI = new ImGearVOITransform();
    dicomDisplaySettings.VOI.Window =
        ImGearVOIWindow.CreateFromChannelSpec(rasterPage.DIB.ChannelDepths[0], rasterPage.DIB.Signed);
}
Dim rasterPage As ImGearRasterPage = igPage
Dim dicomDisplaySettings As ImGearDICOMDisplaySettings = rasterPage.DICOMDisplaySettings
If Not (dicomDisplaySettings Is Nothing) And dicomDisplaySettings.VOI Is Nothing Then
    dicomDisplaySettings.VOI = New ImGearVOITransform()
    dicomDisplaySettings.VOI.Window = ImGearVOIWindow.CreateFromChannelSpec(rasterPage.DIB.ChannelDepths(0), rasterPage.DIB.Signed)
End If
See Also

Reference

ImGearVOIWindow Structure
ImGearVOIWindow Members