多帧配合玲姐修改模块1
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-05-17 09:16:07 +08:00
parent af282d2bb8
commit a4b9c44cfa
2 changed files with 248 additions and 244 deletions

View File

@ -33,19 +33,43 @@
public bool IsDeleted { get; set; } public bool IsDeleted { get; set; }
public bool IsReading { get; set; } = true; public bool IsReading { get; set; } = true;
public List<InstanceBasicInfo> InstanceInfoList { get; set; }
public bool IsExistMutiFrames => InstanceInfoList.Any(t => t.NumberOfFrames > 1);
#region 以后废弃
public List<Guid> InstanceList { get; set; } = new List<Guid>(); public List<Guid> InstanceList { get; set; } = new List<Guid>();
public List<string> InstancePathList { get; set; } = new List<string>(); public List<string> InstancePathList { get; set; } = new List<string>();
public List<string> InstanceHtmlPathList { get; set; } public List<string> InstanceHtmlPathList { get; set; }
//存放在instance 上面 //存放在instance 上面
public string WindowCenter { get; set; } = string.Empty; public string WindowCenter { get; set; } = string.Empty;
public string WindowWidth { get; set; } = string.Empty; public string WindowWidth { get; set; } = string.Empty;
#endregion
public string ImageResizePath { get; set; } public string ImageResizePath { get; set; }
} }
public class InstanceBasicInfo
{
public Guid Id { get; set; }
public string Path { get; set; }
public string HtmlPath { get; set; }
public int NumberOfFrames { get; set; }
}
public class DicomSeriesWithLabelDTO : DicomSeriesDTO public class DicomSeriesWithLabelDTO : DicomSeriesDTO
{ {
public bool HasLabel { get; set; } = false; public bool HasLabel { get; set; } = false;

View File

@ -281,42 +281,22 @@ namespace IRaCIS.Core.Application.Services
t.SeriesList.ForEach(series => t.SeriesList.ForEach(series =>
{ {
series.InstanceList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k => k.Id).ToList();
series.InstanceInfoList = instanceList.Where(t => t.SeriesId == series.Id).OrderBy(t => t.InstanceNumber).Select(k =>
series.InstanceHtmlPathList = instanceList.Where(t => t.SeriesId == series.Id && t.HtmlPath != string.Empty).OrderBy(t => t.InstanceNumber).Select(k => k.HtmlPath).ToList(); new InstanceBasicInfo()
//处理多帧
series.InstancePathList = instanceList.OrderBy(t => t.InstanceNumber).Where(s => s.SeriesId == series.Id)
.SelectMany(u =>
{ {
Id = k.Id,
if (u.NumberOfFrames > 1) NumberOfFrames = k.NumberOfFrames,
{ HtmlPath = k.HtmlPath,
var pathList = new List<string>(); Path = k.Path
}).ToList();
for (int i = 1; i <= u.NumberOfFrames; i++)
{
pathList.Add(u.Path + "?frame=" + (i - 1));
}
return pathList;
}
else
{
return new List<string> { u.Path };
}
})
.ToList();
} }
); );
//设置为阅片与否 不更改数据库检查 的instance数量 和 SeriesCount 所以这里要实时统计 //设置为阅片与否 不更改数据库检查 的instance数量 和 SeriesCount 所以这里要实时统计
t.SeriesCount = t.SeriesList.Count; t.SeriesCount = t.SeriesList.Count;
t.InstanceCount = t.SeriesList.SelectMany(t => t.InstanceList).Count(); t.InstanceCount = t.SeriesList.SelectMany(t => t.InstanceInfoList).Count();
} }