예제 #1
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);
        }
예제 #2
0
        private IDataSource ManageFileSLoaderOptions(CFileLoaderDataSourceOptions fileOptions)
        {
            Log.Message($"[DicomFileLoader] Received managed options. Is report required : {fileOptions.IsReport}, preferable type {fileOptions.PreferableType.Name} ");

            CAtomicPicts dummyPicts = GenerateDummyLoadedFiles();

            if (fileOptions.IsReport)
            {
                return(CFileLoadFilesReport.CreateFromAtomicPicts(dummyPicts));
            }

            return(dummyPicts);
        }
예제 #3
0
        private IDataSource GetFromAtomicPics(CAtomicPicts pics)
        {
            Log.Message("[VolumeCalculator] Generating summary");

            CNumSeriesPropertySummary summary = InitalizeSummmary();

            foreach (CAtomicImageSeries series in pics.GetAs <List <CAtomicImageSeries> >())
            {
                summary.AddPropertyForSeries(series.Info, GetSeriesVol1(series));
                summary.AddPropertyForSeries(series.Info, GetSeriesVol2(series));
            }

            return(summary);
        }
예제 #4
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");
        }