/// <summary>
        /// Factory method to create measure objects
        /// </summary>
        /// <param name="roi">Interactive ROI</param>
        /// <param name="parent">
        /// Reference to measure controller class
        /// </param>
        /// <returns>New measure object</returns>
        public static Measurement CreateMeasure(ROI roi, MeasureAssistant parent)
        {
            Measurement mMeasurement = null;

            switch (roi.ROIMeasureType)
            {
            case MeasureType.Circle:
                mMeasurement = new MeasurementCircle(roi, parent);
                break;

            case MeasureType.Line:
                if (_doFitLineAlgo)
                {
                    mMeasurement = new MeasurementFitLine(roi, parent);
                }
                else
                {
                    mMeasurement = new MeasurementEdge(roi, parent);
                }
                break;

            case MeasureType.Point:
                if (roi is ViewROI.SmartROIs.SmartPoint)
                {
                    mMeasurement = new SmartMeasurements.AutoFitPoint(roi, parent);
                }
                else
                {
                    mMeasurement = new MeasurementEdge(roi, parent);
                }
                break;

            default:
                mMeasurement = new MeasurementEdge(roi, parent);
                break;
            }
            //if (parent.mSelPair)
            //	return new MeasurementPair(roi, parent);
            //else if (roi.ROIMeasureType == MeasureType.Circle)
            //{
            //	return new MeasurementCircle(roi, parent);
            //}
            //else
            //	return new MeasurementEdge(roi, parent);
            return(mMeasurement);
        }
 /// <summary>
 /// Factory method to create measure objects
 /// </summary>
 /// <param name="roi">Interactive ROI</param>
 /// <param name="parent">
 /// Reference to measure controller class
 /// </param>
 /// <returns>New measure object</returns>
 public static Measurement CreateMeasure(ROI roi, MeasureAssistant parent)
 {
     Measurement mMeasurement = null;
     switch (roi.ROIMeasureType)
     {
         case MeasureType.Circle:
             mMeasurement = new MeasurementCircle(roi, parent);
             break;
         case MeasureType.Line:
             if (_doFitLineAlgo)
                 mMeasurement = new MeasurementFitLine(roi, parent);
             else
                 mMeasurement = new MeasurementEdge(roi, parent);
             break;
         case MeasureType.Point:
             if (roi is ViewROI.SmartROIs.SmartPoint)
             {
                 mMeasurement = new SmartMeasurements.AutoFitPoint(roi, parent);
             }
             else
             {
                 mMeasurement = new MeasurementEdge(roi, parent);
             }
             break;
         default:
             mMeasurement = new MeasurementEdge(roi, parent);
             break;
     }
     //if (parent.mSelPair)
     //	return new MeasurementPair(roi, parent);
     //else if (roi.ROIMeasureType == MeasureType.Circle)
     //{
     //	return new MeasurementCircle(roi, parent);
     //}
     //else
     //	return new MeasurementEdge(roi, parent);
     return mMeasurement;
 }