Пример #1
0
 // Volume measurements
 private async Task <VVector[][]> GetContours(int planeId)
 {
     return(await A.ExecuteAsync(new Func <Structure, VVector[][]>((S) =>
     {
         if (S != null)
         {
             return S.GetContoursOnImagePlane(planeId);
         }
         else
         {
             return null;
         }
     }), S));
 }
Пример #2
0
        public async Task <AsyncCourse> GetCourse(string CourseId, IProgress <int> progress)
        {
            if (!CourseIds.Contains(CourseId))
            {
                return(null);
            }
            AsyncCourse c = await A.ExecuteAsync(new Func <Patient, AsyncCourse>((p) =>
            {
                if (p.Courses.Select(x => x.Id).Contains(CourseId))
                {
                    Course C = p.Courses.Where(x => x.Id == CourseId).Single();
                    return(new AsyncCourse(A, C, p, progress));
                }
                else
                {
                    return(null);
                }
            }));

            if (c != null)
            {
                return(c);
            }
            else
            {
                return(null);
            }
            //Courses.Add(CourseId, c);
            //    }
            //}
            //return Courses[CourseId];
        }
Пример #3
0
 public async Task <double> GetSliceSpacing()
 {
     return(await A.ExecuteAsync(new Func <EApp, double>((app) =>
     {
         if (p.StructureSet != null)
         {
             if (p.StructureSet.Image != null)
             {
                 return Math.Abs(p.StructureSet.Image.ZRes);
             }
             else
             {
                 return -1;
             }
         }
         else
         {
             return -1;
         }
     })));
 }