Example #1
0
        /********************************************************************/
        /********************************************************************/

        /// <summary>
        /// Writes model to the file specified by <c>fileName</c>.
        /// </summary>
        public bool saveShapeModel(string fileName)
        {
            if (mImage == null)
            {
                NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED);
                return(false);
            }

            if (createNewModelID)
            {
                if (!createShapeModel())
                {
                    return(false);
                }
            }
            try
            {
                ModelID.WriteShapeModel(fileName);
            }
            catch (HOperatorException e)
            {
                exceptionText = e.Message;
                NotifyIconObserver(MatchingAssistant.ERR_WRITE_SHAPEMODEL);
                return(false);
            }
            return(true);
        }
Example #2
0
        /********************************************************************/
        /********************************************************************/

        /// <summary>
        /// Writes model to the file specified by <c>fileName</c>.
        /// </summary>
        public void saveShapeModel(string fileName)
        {
            //if(mReducedImage == null)
            //{
            //	NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED);
            //	return;
            //}

            //if (createNewModelID)
            //             if (!createShapeModel(fileName))
            //		return;
            try
            {
                string shapeName = fileName + "ShapeImage.shm";
                ModelID.WriteShapeModel(shapeName);
                //string grayName=fileName+"GrayImage.shm";
                //GrayTemplate.WriteTemplate(grayName);
            }
            catch (HOperatorException e)
            {
                exceptionText = e.Message;
                NotifyIconObserver(MatchingAssistant.ERR_WRITE_SHAPEMODEL);
            }
        }