Example #1
0
 private void OutputVTKFDistanceRec(DendriteNode node, DendriteNode parent)
 {
     sbmain.AppendLine(node.ElectricalDistance.ToString("G7"));
     foreach (DendriteNode next in node.ConnectedNodes)
     {
         if (next != parent)
         {
             OutputVTKFDistanceRec(next, node);
         }
     }
 }
Example #2
0
        //void OutputVTKColorRec(DendriteNode node, DendriteNode parent)
        //{
        //    sb.AppendLine(node.NodeColor.R.ToString() + " " + node.NodeColor.G.ToString() + " " + node.NodeColor.B.ToString());
        //    //sb.AppendLine(node.NodeColor.ToArgb().ToString());
        //    foreach (DendriteNode next in node.ConnectedNodes)
        //    {
        //        if (next != parent)
        //        {
        //            OutputVTKColorRec(next, node);
        //        }
        //    }
        //}

        private void OutputVTKDegreeRec(DendriteNode node, DendriteNode parent)
        {
            sbmain.AppendLine(node.Degree.ToString());
            foreach (DendriteNode next in node.ConnectedNodes)
            {
                if (next != parent)
                {
                    OutputVTKDegreeRec(next, node);
                }
            }
        }
Example #3
0
        private void OutputVTKRadiusRec(DendriteNode node, DendriteNode parent)
        {
            sbmain.AppendLine(node.Radius.ToString("G7"));

            foreach (DendriteNode next in node.ConnectedNodes)
            {
                if (next != parent)
                {
                    OutputVTKRadiusRec(next, node);
                }
            }
        }
Example #4
0
        private void OutputVTKPointsRec(DendriteNode node, DendriteNode parent)
        {

            sbmain.AppendLine(node.gx.ToString("G7") + " " + node.gy.ToString("G7") + " " + node.gz.ToString("G7"));

            foreach (DendriteNode next in node.ConnectedNodes)
            {
                if (next != parent)
                {
                    OutputVTKPointsRec(next, node);
                }

            }
        }
Example #5
0
        private void OutputVTKLinesRec(DendriteNode node, DendriteNode parent)
        {
            // !flag && node.NodeType != DendriteNodeType.CONNECT がなりたつのは node == rootnode のときだけ?

            // edgeまたはbranchまできたら、いったん書き込む
            if (flag && node.NodeType != DendriteNodeType.CONNECT)
            {
                nlpoint++;
                ndata++;
                tmp.Append(node.Id.ToString());

                ndata++;
                tmp.Insert(0, nlpoint.ToString() + " ");

                tmpsb.AppendLine(tmp.ToString());

                flag = false;
                nlpoint = 0;
                nlines++;
            }
            else
            {
                // node is not rootnode
                if (parent != null)
                {
                    ndata++;
                    nlpoint++;
                    tmp.Append(node.Id.ToString() + " ");
                }
            }

            foreach (DendriteNode next in node.ConnectedNodes)
            {
                if (next != parent)
                {
                    // edgeまたはbranchだったら、そこから開始する
                    if (!flag && node.NodeType != DendriteNodeType.CONNECT)
                    {
                        flag = true;
                        tmp.Remove(0, tmp.Length);
                        tmp.Append(node.Id.ToString() + " ");
                        nlpoint++;
                        ndata++;
                    }
                    OutputVTKLinesRec(next, node);
                }

            }
        }