Skip to content

Commit

Permalink
修复读入无 Z OIR 出错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
埃博拉酱 committed Mar 26, 2024
1 parent dfdab5b commit 20de47a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
Binary file modified +Image5D/+internal/private/Image5DMex.mexw64
Binary file not shown.
1 change: 1 addition & 0 deletions +Image5D/Exceptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
ZDriveUnitType_too_long(135)
PMT_lacks_DetectorID(136)
Unknown_exception(137)
Index_loading_failure(138)

%MATLAB抛出的异常

Expand Down
2 changes: 1 addition & 1 deletion +Image5D/Version.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function V=Version
V.Me='v3.0.0';
V.Me='v3.0.1';
V.MatlabExtension='14.0.0';
V.MATLAB='R2022b';
persistent NewVersion
Expand Down
18 changes: 9 additions & 9 deletions Image5DLib/Oir读入器.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,21 +422,20 @@ void Oir读入器::创建新索引(const wchar_t* 字符缓冲)
else
throw Image5D异常(PMT电压未定义);
}
if (激光设置.empty())
if ((节点 = 成像参数节点.child("lsmparam:mainLaser")) && (节点 = 节点.child("commonparam:transmissivity")) && (节点文本 = 节点.text()))
std::fill_n(i激光透过率, 索引->SizeZ, 节点文本.as_float());
else
throw Image5D异常(缺少激光参数);
if (有Z && 激光设置.size())
深度参数生成(激光设置, Z起点, 索引->SizeZ, i激光透过率, 索引->Z步长);
else if ((节点 = 成像参数节点.child("lsmparam:mainLaser")) && (节点 = 节点.child("commonparam:transmissivity")) && (节点文本 = 节点.text()))
std::fill_n(i激光透过率, 索引->SizeZ, 节点文本.as_float());
else
深度参数生成(激光设置, Z起点, 索引->SizeZ, i激光透过率,索引->Z步长);
throw Image5D异常(缺少激光参数);
uint16_t* 输出头 = i放大电压;
for (const 通道设备& C : 通道设备向量)
{
const 电压设置& 通道电压 = 探测器电压[C.探测器ID];
if (通道电压.分层设置.empty())
std::fill_n(输出头, 索引->SizeZ, 通道电压.固定设置);
else
if (有Z && 通道电压.分层设置.size())
深度参数生成(通道电压.分层设置, Z起点, 索引->SizeZ, 输出头, 索引->Z步长);
else
std::fill_n(输出头, 索引->SizeZ, 通道电压.固定设置);
输出头 += 索引->SizeZ;
}
索引->哈希签名(文件大小);
Expand Down Expand Up @@ -515,6 +514,7 @@ Oir读入器::Oir读入器(LPCWSTR 头文件路径)
}
catch (...)
{
//throw Image5D异常(索引加载失败);
创建新索引(字符缓冲.get());
}
}
Expand Down
1 change: 1 addition & 0 deletions Image5DLib/include/Image5D异常.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ namespace Image5D
Z驱动单元类型太长,
pmt缺少detectorId,
未知异常,
索引加载失败
};
enum 内部异常类型
{
Expand Down
4 changes: 1 addition & 3 deletions 打包.prj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

依赖:pugixml,AVX2以上指令集,Windows系统(推荐Win11,低版本未测试)</param.description>
<param.screenshot>${PROJECT_ROOT}\工具箱图像.png</param.screenshot>
<param.version>3.0.0</param.version>
<param.version>3.0.1</param.version>
<param.output>${PROJECT_ROOT}\Image5D.mltbx</param.output>
<param.products.name />
<param.products.id />
Expand Down Expand Up @@ -111,8 +111,6 @@ x64
<fileset.rootfiles>
<file>${PROJECT_ROOT}\+Image5D</file>
<file>${PROJECT_ROOT}\doc</file>
<file>${PROJECT_ROOT}\PV1.xml</file>
<file>${PROJECT_ROOT}\PV3.xml</file>
<file>${PROJECT_ROOT}\README.md</file>
<file>${PROJECT_ROOT}\resources</file>
<file>${PROJECT_ROOT}\工具箱图像.png</file>
Expand Down

0 comments on commit 20de47a

Please sign in to comment.