public override int GetHashCode() { unchecked { var hashCode = DimX; hashCode = (hashCode * 397) ^ DimY; hashCode = (hashCode * 397) ^ DimXY; hashCode = (hashCode * 397) ^ SpacingX.GetHashCode(); hashCode = (hashCode * 397) ^ SpacingY.GetHashCode(); hashCode = (hashCode * 397) ^ Origin.GetHashCode(); hashCode = (hashCode * 397) ^ (Direction?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PixelToPhysicalMatrix?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PhysicalToPixelMatrix?.GetHashCode() ?? 0); return(hashCode); } }
protected bool Equals(Volume2D <T> other) { return(DimX == other.DimX && DimY == other.DimY && DimXY == other.DimXY && SpacingX.Equals(other.SpacingX) && SpacingY.Equals(other.SpacingY) && Origin.Equals(other.Origin) && Equals(Direction, other.Direction) && Equals(PixelToPhysicalMatrix, other.PixelToPhysicalMatrix) && Equals(PhysicalToPixelMatrix, other.PhysicalToPixelMatrix)); }