예제 #1
0
        private void  SizeDistributionForAClass(PicesClass c,
                                                bool includeChildren,
                                                ref PicesImageSizeDistribution downCastAcumulated,
                                                ref PicesImageSizeDistribution upCastAcumulated
                                                )
        {
            statusMsgs.AddMsg("Extracting for Class[" + c.Name + "]");
            sbyte ch = (sbyte)statistic;
            PicesImageSizeDistribution classDownCast = null;
            PicesImageSizeDistribution classUpCast   = null;

            threadConn.ImagesSizeDistributionByDepth(this.cruise, this.station, this.deployment, c.Name,
                                                     0.0f, // MaxDepth
                                                     5.0f,
                                                     ch,
                                                     initialSizeValue,
                                                     growthRate,
                                                     (float)MaxSizeField.Value,
                                                     ref classDownCast,
                                                     ref classUpCast
                                                     );

            if (classDownCast != null)
            {
                if (downCastAcumulated == null)
                {
                    downCastAcumulated = classDownCast;
                }
                else
                {
                    downCastAcumulated.AddIn(classDownCast, runLog);
                }
            }

            if (classUpCast != null)
            {
                if (upCastAcumulated == null)
                {
                    upCastAcumulated = classUpCast;
                }
                else
                {
                    upCastAcumulated.AddIn(classUpCast, runLog);
                }
            }

            if (includeChildren)
            {
                foreach (PicesClass pc in  c.Children)
                {
                    if (cancelRequested)
                    {
                        break;
                    }
                    SizeDistributionForAClass(pc, includeChildren, ref downCastAcumulated, ref upCastAcumulated);
                }
            }
        } /* SizeDistributionForAClass */