示例#1
0
        /// <summary>
        /// 現在のノードを返し,イテレータを次のノードに移動させる.
        /// </summary>
        /// <param name="treeIterator">初期化されるツリーのイテレータ</param>
        /// <returns></returns>
#else
        /// <summary>
        /// Returns the currently observed node and moves iterator toward the next node
        /// </summary>
        /// <param name="treeIterator">Tree iterator initialized by the function. </param>
        /// <returns></returns>
#endif
        public static IntPtr NextTreeNode(CvTreeNodeIterator treeIterator)
        {
            if (treeIterator == null)
            {
                throw new ArgumentNullException("treeIterator");
            }

            return(NativeMethods.cvNextTreeNode(treeIterator));
        }
示例#2
0
        /// <summary>
        /// 現在のノードを返し,イテレータを次のノードに移動させる.
        /// </summary>
        /// <param name="treeIterator">初期化されるツリーのイテレータ</param>
        /// <returns></returns>
#else
        /// <summary>
        /// Returns the currently observed node and moves iterator toward the next node
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="treeIterator">Tree iterator initialized by the function. </param>
        /// <returns></returns>
#endif
        public static T NextTreeNode <T>(CvTreeNodeIterator treeIterator) where T : CvArr
        {
            if (treeIterator == null)
            {
                throw new ArgumentNullException("treeIterator");
            }

            IntPtr result = NativeMethods.cvNextTreeNode(treeIterator);

            if (result == IntPtr.Zero)
            {
                return(null);
            }
            else
            {
                return(Util.Cast <T>(result));
            }
        }
示例#3
0
 /// <summary>
 /// Convert to generic class
 /// </summary>
 /// <param name="it"></param>
 public CvTreeNodeIterator(CvTreeNodeIterator it)
 {
     node      = it.Node;
     level     = it.Level;
     max_level = it.MaxLevel;
 }
示例#4
0
        /// <summary>
        /// 現在のノードを返し,イテレータを次のノードに移動させる.
        /// </summary>
        /// <param name="treeIterator">初期化されるツリーのイテレータ</param>
        /// <returns></returns>
#else
        /// <summary>
        /// Returns the currently observed node and moves iterator toward the next node
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="treeIterator">Tree iterator initialized by the function. </param>
        /// <returns></returns>
#endif
        public static T NextTreeNode <T>(CvTreeNodeIterator <T> treeIterator) where T : CvArr
        {
            return(NextTreeNode <T>((CvTreeNodeIterator)treeIterator));
        }