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)
|
//if (originOffsetTable.Count == pixelData.NumberOfFrames)
|
||||||
{
|
//{
|
||||||
newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
// newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
||||||
|
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
{
|
||||||
newFragments.OffsetTable.AddRange(bot.ToArray());
|
newFragments.OffsetTable.AddRange(bot.ToArray());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -918,7 +918,7 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
||||||
uploadInfo.FileSize = fileStream.CanSeek ? fileStream.Length : 0;
|
uploadInfo.FileSize = fileStream.CanSeek ? fileStream.Length : 0;
|
||||||
uploadInfo.Path = returnPath;
|
uploadInfo.Path = returnPath;
|
||||||
uploadInfo.FileName = fileRealName;
|
uploadInfo.FileName = fileRealName;
|
||||||
uploadInfo.FileType = Path.GetExtension(returnPath);
|
uploadInfo.FileType = Path.GetExtension(returnPath).TrimStart('.');
|
||||||
|
|
||||||
|
|
||||||
await _fileUploadRecordService.AddOrUpdateFileUploadRecord(uploadInfo);
|
await _fileUploadRecordService.AddOrUpdateFileUploadRecord(uploadInfo);
|
||||||
|
|
@ -1057,7 +1057,7 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
||||||
uploadInfo.FileSize = fileSize;
|
uploadInfo.FileSize = fileSize;
|
||||||
uploadInfo.Path = returnPath;
|
uploadInfo.Path = returnPath;
|
||||||
uploadInfo.FileName = Path.GetFileName(localFilePath);
|
uploadInfo.FileName = Path.GetFileName(localFilePath);
|
||||||
uploadInfo.FileType = Path.GetExtension(returnPath);
|
uploadInfo.FileType = Path.GetExtension(returnPath).TrimStart(".");
|
||||||
|
|
||||||
|
|
||||||
await _fileUploadRecordService.AddOrUpdateFileUploadRecord(uploadInfo);
|
await _fileUploadRecordService.AddOrUpdateFileUploadRecord(uploadInfo);
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,20 @@ public static class DicomPixelMasker
|
||||||
{
|
{
|
||||||
workingDataset.AddOrUpdate(DicomTag.BurnedInAnnotation, "NO");
|
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 强行写回
|
// 不要把 original photometric 强行写回
|
||||||
var finalFile = await ReEncodeToOriginalTransferSyntaxAsync(
|
var finalFile = await ReEncodeToOriginalTransferSyntaxAsync(
|
||||||
workingFile,
|
workingFile,
|
||||||
|
|
@ -422,17 +436,26 @@ public static class DicomPixelMasker
|
||||||
DicomPixelData sourcePixelData,
|
DicomPixelData sourcePixelData,
|
||||||
IReadOnlyList<IByteBuffer> frames)
|
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);
|
dataset.Remove(DicomTag.PixelData);
|
||||||
|
|
||||||
var newPixelData = DicomPixelData.Create(dataset, true);
|
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)
|
foreach (var frame in frames)
|
||||||
{
|
{
|
||||||
newPixelData.AddFrame(frame);
|
newPixelData.AddFrame(frame);
|
||||||
|
|
|
||||||
|
|
@ -17399,17 +17399,17 @@
|
||||||
</member>
|
</member>
|
||||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
|
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
|
||||||
<summary>
|
<summary>
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
质疑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
|
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
|
||||||
<summary>
|
<summary>
|
||||||
һ<EFBFBD><EFBFBD><EFBFBD>Ժ˲<EFBFBD>
|
一致性核查
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
|
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
|
||||||
<summary>
|
<summary>
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
复制
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRe
|
||||||
{
|
{
|
||||||
addOrEditFileUploadRecord.IsNeedSync = true;
|
addOrEditFileUploadRecord.IsNeedSync = true;
|
||||||
|
|
||||||
addOrEditFileUploadRecord.Priority = 0;
|
addOrEditFileUploadRecord.Priority = addOrEditFileUploadRecord.Priority?? 0;
|
||||||
|
|
||||||
addOrEditFileUploadRecord.IsSync = false;
|
addOrEditFileUploadRecord.IsSync = false;
|
||||||
}
|
}
|
||||||
|
|
@ -242,7 +242,7 @@ public class FileUploadRecordService(IRepository<FileUploadRecord> _fileUploadRe
|
||||||
|
|
||||||
addOrEditFileUploadRecord.IsSync = false;
|
addOrEditFileUploadRecord.IsSync = false;
|
||||||
|
|
||||||
addOrEditFileUploadRecord.Priority = 0;
|
addOrEditFileUploadRecord.Priority = addOrEditFileUploadRecord.Priority ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
var entity = await _fileUploadRecordRepository.InsertOrUpdateAsync(addOrEditFileUploadRecord, true);
|
var entity = await _fileUploadRecordRepository.InsertOrUpdateAsync(addOrEditFileUploadRecord, true);
|
||||||
|
|
|
||||||
|
|
@ -166,46 +166,76 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||||
var newFragments = new DicomOtherByteFragment(DicomTag.PixelData);
|
var newFragments = new DicomOtherByteFragment(DicomTag.PixelData);
|
||||||
|
|
||||||
|
|
||||||
#region 最终使用
|
|
||||||
|
|
||||||
for (int n = 0; n < pixelData.NumberOfFrames; n++)
|
for (int n = 0; n < pixelData.NumberOfFrames; n++)
|
||||||
{
|
{
|
||||||
var frameData = pixelData.GetFrame(n); // 获取完整一帧
|
var frameData = pixelData.GetFrame(n);
|
||||||
var data = frameData.Data;
|
var data = frameData.Data;
|
||||||
int offset = 0;
|
|
||||||
|
|
||||||
|
// 当前 frame 起始 offset
|
||||||
bot.Add(botOffset);
|
bot.Add(botOffset);
|
||||||
|
|
||||||
botOffset += (uint)data.Length;
|
int offset = 0;
|
||||||
|
|
||||||
|
|
||||||
while (offset < data.Length)
|
while (offset < data.Length)
|
||||||
{
|
{
|
||||||
botOffset += 8;
|
|
||||||
|
|
||||||
|
|
||||||
int size = Math.Min(fragmentSize, data.Length - offset);
|
int size = Math.Min(fragmentSize, data.Length - offset);
|
||||||
|
|
||||||
var buffer = new byte[size];
|
var buffer = new byte[size];
|
||||||
Buffer.BlockCopy(data, offset, buffer, 0, size);
|
Buffer.BlockCopy(data, offset, buffer, 0, size);
|
||||||
|
|
||||||
newFragments.Fragments.Add(new MemoryByteBuffer(buffer));
|
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)
|
//if (originOffsetTable.Count == pixelData.NumberOfFrames)
|
||||||
{
|
//{
|
||||||
newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
// newFragments.OffsetTable.AddRange(originOffsetTable.ToArray());
|
||||||
|
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
{
|
||||||
newFragments.OffsetTable.AddRange(bot.ToArray());
|
newFragments.OffsetTable.AddRange(bot.ToArray());
|
||||||
|
|
||||||
|
Log.Logger.Warning(bot.ToArray().ToJsonStr());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -359,6 +359,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
await _mailVerificationService.AnolymousSendEmailForResetAccount(email, verificationCode);
|
await _mailVerificationService.AnolymousSendEmailForResetAccount(email, verificationCode);
|
||||||
|
|
||||||
|
await _fusionCache.RemoveAsync(CacheKeys.UserLoginError(existUser.UserName));
|
||||||
|
|
||||||
await _fusionCache.RemoveByTagAsync(CacheKeys.UserMFATag(existUser.Id));
|
await _fusionCache.RemoveByTagAsync(CacheKeys.UserMFATag(existUser.Id));
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue