Show / Hide Table of Contents
View Source

Class IndexHelper

Has helpful methods for converting from an index to x,y,z coordinates in a pixel lattice and visa versa

Inheritance
System.Object
IndexHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:EvilDICOM.Core.Helpers
Assembly:EvilDICOM.dll
Syntax
public class IndexHelper

Methods

View Source

IndexToLatticeXY(Int32, Int32)

Converts a input 1D index of a pixel in a lattice to the X, Y coordinates of the pixel

Declaration
public static (int x, int y) IndexToLatticeXY(int index, int dimX)
Parameters
Type Name Description
System.Int32 index

the 1D index of the pixel

System.Int32 dimX

the width of the lattice in the X direction

Returns
Type Description
System.ValueTuple<System.Int32, System.Int32>

a value tuple of the X,Y,Z coordiantes

View Source

IndexToLatticeXYZ(Int32, Int32, Int32)

Converts a input 1D index of a pixel in a lattice to the X, Y, Z coordinates of the pixel

Declaration
public static (int x, int y, int z) IndexToLatticeXYZ(int index, int dimX, int dimY)
Parameters
Type Name Description
System.Int32 index

the 1D index of the pixel

System.Int32 dimX

the width of the lattice in the X direction

System.Int32 dimY

the height of the lattice in the Y direction

Returns
Type Description
System.ValueTuple<System.Int32, System.Int32, System.Int32>

a value tuple of the X,Y,Z coordiantes

View Source

LatticeXYToIndex(Int32, Int32, Int32)

Converts X,Y coordinates in a 2D pixel lattice to a 1D index

Declaration
public static int LatticeXYToIndex(int x, int y, int dimX)
Parameters
Type Name Description
System.Int32 x

the x coordinate of the pixel

System.Int32 y

the y coordinate of the pixel

System.Int32 dimX

the width of the lattice in the X direction

Returns
Type Description
System.Int32

the index of the pixel in the 2D lattife

View Source

LatticeXYZToIndex(Int32, Int32, Int32, Int32, Int32)

Converts X,Y,Z coordinates in a 3D pixel lattice to a 1D index

Declaration
public static int LatticeXYZToIndex(int x, int y, int z, int dimX, int dimY)
Parameters
Type Name Description
System.Int32 x

the x coordinate of the pixel

System.Int32 y

the y coordinate of the pixel

System.Int32 z

the z coordinate of the pixel

System.Int32 dimX

the width of the lattice in the X direction

System.Int32 dimY

the height of the lattice in the Y direction

Returns
Type Description
System.Int32

the index of the pixel in the 3D lattice

Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX