// load reference
vtkImageData* reference = loadImage(reference_filename);
assert(reference);
+
+ // translate target with arguments values
+ // reference is translated instead of target so that the output space stay the same as target
+ {
+ double reference_origin[3];
+ reference->GetOrigin(reference_origin);
+ reference_origin[0] -= args_info.translation_x_arg;
+ reference_origin[1] -= args_info.translation_y_arg;
+ reference_origin[2] -= args_info.translation_z_arg;
+ reference->SetOrigin(reference_origin);
+ }
// intensity normalisation
if (!use_dose_margin) {
vtkImageData* target = loadImage(target_filename);
assert(target);
+
// allocate output
OutputImageType::Pointer output = OutputImageType::New();
{
option "spatial-margin" s "Spatial margin [mm]" double yes
option "relative-dose-margin" r "Dose margin relative to max dose in reference [%]" double no
option "absolute-dose-margin" d "Absolute dose margin [Gray]" double no
+option "translation-x" x "Target relative position x [mm]" double default="0" no
+option "translation-y" y "Target relative position y [mm]" double default="0" no
+option "translation-z" z "Target relative position z [mm]" double default="0" no