private Set(int elementType, SequenceKind kind, SequenceFlags flags, MemStorage storage) : base(storage) { var pSet = NativeMethods.cvCreateSet(elementType | (int)kind | (int)flags, SeqHelper.SetHeaderSize, MatHelper.GetElemSize(elementType), storage); SetHandle(pSet); }
private Seq(int elementType, SequenceKind kind, SequenceFlags flags, MemStorage storage) : base(true) { owner = storage; var pSeq = NativeMethods.cvCreateSeq(elementType | (int)kind | (int)flags, SeqHelper.SeqHeaderSize, (UIntPtr)MatHelper.GetElemSize((int)elementType), storage); SetHandle(pSeq); }
public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType) { if ((value == null)) { return(null); } SequenceKind valueCasted = ((SequenceKind)(value)); if ((valueCasted == SequenceKind.PosNegZero)) { return("posNegZero"); } if ((valueCasted == SequenceKind.DirQuadZero)) { return("dirQuadZero"); } throw new ArgumentOutOfRangeException("value"); }
/// <summary> /// Initializes a new instance of the <see cref="Seq"/> class with the specified /// common element type and sequence <paramref name="kind"/>. /// Memory for the sequence will be allocated from the provided <paramref name="storage"/>. /// </summary> /// <param name="elementType">The type of elements in the sequence.</param> /// <param name="kind">The kind of sequence to create.</param> /// <param name="storage">The memory storage used to grow the sequence.</param> public Seq(SequenceElementType elementType, SequenceKind kind, MemStorage storage) : this((int)elementType, kind, SequenceFlags.Simple, storage) { }
/// <summary> /// Initializes a new instance of the <see cref="Seq"/> class with the specified /// element bit <paramref name="depth"/>, <paramref name="channels"/> per element, /// sequence <paramref name="kind"/> and operational <paramref name="flags"/>. /// Memory for the sequence will be allocated from the provided <paramref name="storage"/>. /// </summary> /// <param name="depth">The bit depth of sequence elements.</param> /// <param name="channels">The number of channels per sequence element.</param> /// <param name="kind">The kind of sequence to create.</param> /// <param name="flags">The operational flags for the sequence.</param> /// <param name="storage">The memory storage used to grow the sequence.</param> public Seq(Depth depth, int channels, SequenceKind kind, SequenceFlags flags, MemStorage storage) : this(MatHelper.GetMatType(depth, channels), kind, flags, storage) { }