This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
|
||||
public string SliceThickness { get; set; } = String.Empty;
|
||||
|
||||
public string ImagePositionPatient { get; set; }
|
||||
public string ImageOrientationPatient { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,14 @@ namespace IRaCIS.Core.Application.Services
|
||||
.OrderBy(s => s.InstanceNumber).ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
// ⭐ DICOM 空间排序(带兜底)
|
||||
var sorted = DicomSortHelper.SortSlices(
|
||||
list,
|
||||
x => x.ImagePositionPatient,
|
||||
x => x.ImageOrientationPatient,
|
||||
x => x.InstanceNumber
|
||||
);
|
||||
|
||||
var seriesInfo = await _instanceRepository.Where(s => s.SeriesId == seriesId).Select(t => new
|
||||
{
|
||||
t.DicomSerie.ImageResizePath,
|
||||
@@ -38,7 +46,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
t.DicomSerie.SubjectVisit.VisitName
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
return ResponseOutput.Ok(list, seriesInfo);
|
||||
return ResponseOutput.Ok(sorted, seriesInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user