Пример #1
0
        /// <summary>
        /// Loads the specified path.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <returns>Tree of segmentation produces by DiviK</returns>
        /// <exception cref="FileNotFoundException">path does not point file</exception>
        public DivikResult Load(string path)
        {
            if (!File.Exists(path))
            {
                throw new FileNotFoundException(message: nameof(DivikResultLoader), fileName: path);
            }
            var divikTree = _segmentationContext.load_divik_result(path);

            return(new DivikResult(divikTree));
        }