GetNewViewPerspective(RasterViewPerspective,double[],PlaneOrientation) Method

Summary
Gets a new RasterViewPerspective that results from applying a PlaneOrientation to a given RasterViewPerspective and two given direction cosine vectors.
Syntax
C#
C++
vb[VB Syntax] 
Public Overloads Shared Function GetNewViewPerspective( _ 
   ByVal _viewPerspectiveOriginal_ As RasterViewPerspective, _ 
   ByVal _imageOrientationVectors_() As Double, _ 
   ByVal _po_ As PlaneOrientation _ 
) As RasterViewPerspective 

Parameters

viewPerspectiveOriginal
The input RasterViewPerspective to which the PlaneOrientation will be applied.

imageOrientationVectors
The row and column orientation vectors (or direction cosine vectors) that apply to  viewPerspectiveOriginal

po
A PlaneOrientation that is applied to the original RasterViewPerspective

Return Value

The new RasterViewPerspective that results from having the PlaneOrientation applied.

Remarks

The input view perspective is define by two values: the original RasterViewPerspectiveviewPerspectiveOriginal), and a row and column orientation vector ( imageOrientationVectors). This method returns the new RasterViewPerspective that results from applying a PlaneOrientation to the input view perspective.

Example

This example does the following:

  • Creates a coronal PlaneOrientation that corresponds to a horizontal flip
  • Defines orientation vectors that corresponds to a coronal slice
  • Applies the above to a view perspective, and returns the resulting view perspective
C#
using Leadtools.Dicom; 
using Leadtools.Dicom.Common; 
using Leadtools.Dicom.Common.Extensions; 
using Leadtools; 
using Leadtools.Dicom.Common.Linq.BasicDirectory; 
using Leadtools.Dicom.Common.DataTypes; 
 
 
public void GetNewViewPerspectiveExample() 
{ 
   // Create a new coronal PlaneOrientation that corresponds to a horizontal flip 
   PlaneOrientation poCoronal = new PlaneOrientation(); 
   poCoronal.Name = "Coronal or Frontal"; 
 
   // This corresponds to a horizontal flip 
   poCoronal.Top = OrientationAxis.Inferior; 
   poCoronal.Right = OrientationAxis.Right; 
 
   // This condition is ignored 
   TagValueOrientationCondition condition = new TagValueOrientationCondition(DicomTag.ImageOrientationPatient, null); 
   poCoronal.Condition = condition; 
 
   // This specifies a row and column orientation vector that correspond to a coronal slice 
   // Row: (1,0,0) 
   // Col: (0,0,-1) 
   double[] imageOrientationVectors = new double[6] { 1, 0, 0, 0, 0, -1 }; 
 
   // Find the new view perspective 
   RasterViewPerspective newViewPerspective = DicomExtensions.GetNewViewPerspective(RasterViewPerspective.TopLeft, imageOrientationVectors, poCoronal); 
 
   // New view perspective should be BottomLeft 
   Console.WriteLine("newViewPerspective should be BottomLeft\nActual newViewPerspective is " + newViewPerspective.ToString()); 
} 
Requirements

Target Platforms

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

Leadtools.Dicom.Common Assembly

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