Skip to content

Commit 1847e08

Browse files
committed
adding flag to intraop regi so that log remapping of 2D projection may
be skipped, and also only printing a warning when no 2D segmentation is specified for methods 2 or 3.
1 parent a297faa commit 1847e08

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

apps/intraop_pelvis_femurs_regi/xreg_intraop_femurs_pelvis_femurs_regi_main.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ int main(int argc, char* argv[])
8484
"Do NOT convert RAS to LPS (or LPS to RAS) for the 3D landmarks; "
8585
"RAS to LPS conversion negates the first and second components.")
8686
<< false;
87+
88+
po.add("no-log-remap", ProgOpts::kNO_SHORT_FLAG, ProgOpts::kSTORE_TRUE, "no-log-remap",
89+
"Do NOT perform log remapping of the projection intensities during pre-processing.")
90+
<< false;
8791

8892
po.add_backend_flags();
8993

@@ -127,6 +131,8 @@ int main(int argc, char* argv[])
127131
const bool ras2lps = !po.get("no-ras2lps").as_bool();
128132

129133
const size_type proj_idx = po.get("proj-idx").as_uint32();
134+
135+
const bool no_log_remap = po.get("no-log-remap");
130136

131137
if ((regi_method_id < 1) || (regi_method_id > 3))
132138
{
@@ -138,8 +144,8 @@ int main(int argc, char* argv[])
138144

139145
if ((regi_method_id > 1) && !read_proj_seg)
140146
{
141-
std::cerr << "ERROR: must use 2D segmentation for methods 2 or 3!" << std::endl;
142-
return kEXIT_VAL_BAD_USE;
147+
std::cerr << "WARNING: 2D segmentation is needed for methods 2 or 3 in order to "
148+
"match IPCAI paper!" << std::endl;
143149
}
144150

145151
//////////////////////////////////////////////////////////////////////////////
@@ -227,7 +233,8 @@ int main(int argc, char* argv[])
227233
pd, read_proj_seg ? &proj_seg : nullptr, save_debug,
228234
ProgOptsLineIntRayCasterFactory(po),
229235
ProgOptsSimMetricFactory(po),
230-
vout);
236+
vout,
237+
no_log_remap);
231238

232239
vout << "writing pelvis regi pose to disk..." << std::endl;
233240
WriteITKAffineTransform(dst_pelvis_regi_pose_path, ml_mo_regi.cur_cam_to_vols[0]);

0 commit comments

Comments
 (0)