Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
commit
d594c6e52a
|
|
@ -540,12 +540,12 @@ namespace IRaCIS.Core.SCP.Service
|
|||
|
||||
//保留原始偏移表
|
||||
|
||||
if (originOffsetTable.Count == pixelData.NumberOfFrames)
|
||||
{
|
||||
newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
||||
//if (originOffsetTable.Count == pixelData.NumberOfFrames)
|
||||
//{
|
||||
// newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
||||
|
||||
}
|
||||
else
|
||||
//}
|
||||
//else
|
||||
{
|
||||
newFragments.OffsetTable.AddRange(bot.ToArray());
|
||||
|
||||
|
|
@ -674,7 +674,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
|
||||
// 上传缩略图到 OSS
|
||||
|
||||
var seriesPath = await ossService.UploadToOSSAsync(memoryStream, ossFolderPath, $"{seriesId.ToString()}_{instanceId.ToString()}.preview.jpg", false,uploadInfo: new FileUploadRecordAddOrEdit() { TrialId = _trialId, BatchDataType = BatchDataType.PACSReceive });
|
||||
var seriesPath = await ossService.UploadToOSSAsync(memoryStream, ossFolderPath, $"{seriesId.ToString()}_{instanceId.ToString()}.preview.jpg", false, uploadInfo: new FileUploadRecordAddOrEdit() { TrialId = _trialId, BatchDataType = BatchDataType.PACSReceive });
|
||||
|
||||
|
||||
series.ImageResizePath = seriesPath;
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
|||
uploadInfo.FileSize = fileStream.CanSeek ? fileStream.Length : 0;
|
||||
uploadInfo.Path = returnPath;
|
||||
uploadInfo.FileName = fileRealName;
|
||||
uploadInfo.FileType = Path.GetExtension(returnPath);
|
||||
uploadInfo.FileType = Path.GetExtension(returnPath).TrimStart('.');
|
||||
|
||||
|
||||
await _fileUploadRecordService.AddOrUpdateFileUploadRecord(uploadInfo);
|
||||
|
|
@ -1057,7 +1057,7 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
|||
uploadInfo.FileSize = fileSize;
|
||||
uploadInfo.Path = returnPath;
|
||||
uploadInfo.FileName = Path.GetFileName(localFilePath);
|
||||
uploadInfo.FileType = Path.GetExtension(returnPath);
|
||||
uploadInfo.FileType = Path.GetExtension(returnPath).TrimStart(".");
|
||||
|
||||
|
||||
await _fileUploadRecordService.AddOrUpdateFileUploadRecord(uploadInfo);
|
||||
|
|
|
|||
|
|
@ -237,6 +237,20 @@ public static class DicomPixelMasker
|
|||
{
|
||||
workingDataset.AddOrUpdate(DicomTag.BurnedInAnnotation, "NO");
|
||||
}
|
||||
|
||||
//// 转 JPEG Baseline(最稳定)
|
||||
//var transcoder = new DicomTranscoder(
|
||||
// DicomTransferSyntax.ExplicitVRLittleEndian,
|
||||
// DicomTransferSyntax.JPEGProcess1);
|
||||
|
||||
//var finalFile = await Task.Run(
|
||||
// () => transcoder.Transcode(workingFile),
|
||||
// cancellationToken).ConfigureAwait(false);
|
||||
|
||||
//if (output.CanSeek)
|
||||
// output.SetLength(0);
|
||||
//await finalFile.SaveAsync(output).ConfigureAwait(false);
|
||||
|
||||
// 不要把 original photometric 强行写回
|
||||
var finalFile = await ReEncodeToOriginalTransferSyntaxAsync(
|
||||
workingFile,
|
||||
|
|
@ -422,17 +436,26 @@ public static class DicomPixelMasker
|
|||
DicomPixelData sourcePixelData,
|
||||
IReadOnlyList<IByteBuffer> frames)
|
||||
{
|
||||
//dataset.Remove(DicomTag.PixelData);
|
||||
//var newPixelData = DicomPixelData.Create(dataset, true);
|
||||
////newPixelData.BitsAllocated = sourcePixelData.BitsAllocated;
|
||||
//newPixelData.BitsStored = sourcePixelData.BitsStored;
|
||||
//newPixelData.HighBit = sourcePixelData.HighBit;
|
||||
//newPixelData.SamplesPerPixel = sourcePixelData.SamplesPerPixel;
|
||||
//newPixelData.PixelRepresentation = sourcePixelData.PixelRepresentation;
|
||||
//newPixelData.PlanarConfiguration = sourcePixelData.PlanarConfiguration;
|
||||
//newPixelData.Height = sourcePixelData.Height;
|
||||
//newPixelData.Width = sourcePixelData.Width;
|
||||
//newPixelData.PhotometricInterpretation = sourcePixelData.PhotometricInterpretation;
|
||||
//foreach (var frame in frames)
|
||||
//{
|
||||
// newPixelData.AddFrame(frame);
|
||||
//}
|
||||
|
||||
dataset.Remove(DicomTag.PixelData);
|
||||
|
||||
var newPixelData = DicomPixelData.Create(dataset, true);
|
||||
//newPixelData.BitsAllocated = sourcePixelData.BitsAllocated;
|
||||
newPixelData.BitsStored = sourcePixelData.BitsStored;
|
||||
newPixelData.HighBit = sourcePixelData.HighBit;
|
||||
newPixelData.SamplesPerPixel = sourcePixelData.SamplesPerPixel;
|
||||
newPixelData.PixelRepresentation = sourcePixelData.PixelRepresentation;
|
||||
newPixelData.PlanarConfiguration = sourcePixelData.PlanarConfiguration;
|
||||
newPixelData.Height = sourcePixelData.Height;
|
||||
newPixelData.Width = sourcePixelData.Width;
|
||||
newPixelData.PhotometricInterpretation = sourcePixelData.PhotometricInterpretation;
|
||||
|
||||
foreach (var frame in frames)
|
||||
{
|
||||
newPixelData.AddFrame(frame);
|
||||
|
|
|
|||
|
|
@ -17399,17 +17399,17 @@
|
|||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
|
||||
<summary>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
质疑
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
|
||||
<summary>
|
||||
һ<EFBFBD><EFBFBD><EFBFBD>Ժ˲<EFBFBD>
|
||||
一致性核查
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
|
||||
<summary>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
复制
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRe
|
|||
{
|
||||
addOrEditFileUploadRecord.IsNeedSync = true;
|
||||
|
||||
addOrEditFileUploadRecord.Priority = 0;
|
||||
addOrEditFileUploadRecord.Priority = addOrEditFileUploadRecord.Priority?? 0;
|
||||
|
||||
addOrEditFileUploadRecord.IsSync = false;
|
||||
}
|
||||
|
|
@ -242,7 +242,7 @@ public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRe
|
|||
|
||||
addOrEditFileUploadRecord.IsSync = false;
|
||||
|
||||
addOrEditFileUploadRecord.Priority = 0;
|
||||
addOrEditFileUploadRecord.Priority = addOrEditFileUploadRecord.Priority ?? 0;
|
||||
}
|
||||
|
||||
var entity = await _fileUploadRecordRepository.InsertOrUpdateAsync(addOrEditFileUploadRecord, true);
|
||||
|
|
|
|||
|
|
@ -166,46 +166,76 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
var newFragments = new DicomOtherByteFragment(DicomTag.PixelData);
|
||||
|
||||
|
||||
#region 最终使用
|
||||
|
||||
for (int n = 0; n < pixelData.NumberOfFrames; n++)
|
||||
{
|
||||
var frameData = pixelData.GetFrame(n); // 获取完整一帧
|
||||
var frameData = pixelData.GetFrame(n);
|
||||
var data = frameData.Data;
|
||||
int offset = 0;
|
||||
|
||||
// 当前 frame 起始 offset
|
||||
bot.Add(botOffset);
|
||||
|
||||
botOffset += (uint)data.Length;
|
||||
|
||||
int offset = 0;
|
||||
|
||||
while (offset < data.Length)
|
||||
{
|
||||
botOffset += 8;
|
||||
|
||||
|
||||
int size = Math.Min(fragmentSize, data.Length - offset);
|
||||
|
||||
var buffer = new byte[size];
|
||||
Buffer.BlockCopy(data, offset, buffer, 0, size);
|
||||
|
||||
newFragments.Fragments.Add(new MemoryByteBuffer(buffer));
|
||||
|
||||
offset += size;
|
||||
// 一个 fragment:
|
||||
// 8-byte item header
|
||||
// + fragment payload
|
||||
botOffset += (uint)(8 + size);
|
||||
|
||||
offset += size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 最终使用
|
||||
|
||||
//for (int n = 0; n < pixelData.NumberOfFrames; n++)
|
||||
//{
|
||||
// var frameData = pixelData.GetFrame(n); // 获取完整一帧
|
||||
// var data = frameData.Data;
|
||||
// int offset = 0;
|
||||
|
||||
// bot.Add(botOffset);
|
||||
|
||||
// botOffset += (uint)data.Length;
|
||||
|
||||
|
||||
// while (offset < data.Length)
|
||||
// {
|
||||
// botOffset += 8;
|
||||
|
||||
|
||||
// int size = Math.Min(fragmentSize, data.Length - offset);
|
||||
// var buffer = new byte[size];
|
||||
// Buffer.BlockCopy(data, offset, buffer, 0, size);
|
||||
|
||||
// newFragments.Fragments.Add(new MemoryByteBuffer(buffer));
|
||||
|
||||
// offset += size;
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
//保留原始偏移表
|
||||
|
||||
if (originOffsetTable.Count == pixelData.NumberOfFrames)
|
||||
{
|
||||
newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
||||
//if (originOffsetTable.Count == pixelData.NumberOfFrames)
|
||||
//{
|
||||
// newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
||||
|
||||
}
|
||||
else
|
||||
//}
|
||||
//else
|
||||
{
|
||||
newFragments.OffsetTable.AddRange(bot.ToArray());
|
||||
|
||||
Log.Logger.Warning(bot.ToArray().ToJsonStr());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -359,6 +359,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _mailVerificationService.AnolymousSendEmailForResetAccount(email, verificationCode);
|
||||
|
||||
await _fusionCache.RemoveAsync(CacheKeys.UserLoginError(existUser.UserName));
|
||||
|
||||
await _fusionCache.RemoveByTagAsync(CacheKeys.UserMFATag(existUser.Id));
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
|
|
|||
Loading…
Reference in New Issue