Ejemplo n.º 1
0
 public IDataSource GetDataSource(CDataSourceOptions options)
 {
     if (options is CFileLoaderDataSourceOptions fileOptions)
     {
         return(ManageFileSLoaderOptions(fileOptions));
     }
     else
     {
         return(ManageCommonOptions(options));
     }
 }
Ejemplo n.º 2
0
        private static IDataSource ManageCommonOptions(CDataSourceOptions options)
        {
            Log.Message($"[DicomFileLoader] Received common options, preferable type {options.PreferableType.Name}");

            CAtomicPicts dummyPicts = GenerateDummyLoadedFiles();

            if (options.PreferableType == typeof(DataTable))
            {
                return(CFileLoadFilesReport.CreateFromAtomicPicts(dummyPicts));
            }

            return(dummyPicts);
        }
Ejemplo n.º 3
0
        public IDataSource GetDataSource(CDataSourceOptions options)
        {
            Log.Message("[VolumeCalculator] Initalizing volume calculation");

            CAtomicPicts pics = _dataSource.TryGetAs <CAtomicPicts>();

            if (pics != null)
            {
                return(GetFromAtomicPics(pics));
            }

            Log.Message("[VolumeCalculator] cannot parse DataSource as Atomic pics");

            throw new Exception("[VolumeCalculator] failed to get data from input");
        }