UCL / pet-rd-tools

Command line tools for PET-MR (pre-)processing
Apache License 2.0
13 stars 4 forks source link

Resample such that mu-map is centered at x, y = (0, 0) #19

Closed ashgillman closed 3 years ago

ashgillman commented 6 years ago

Somewhat solves #18

Don't actually accept this PR, I left lots of junk in the commit.

I am just including as it may be a useful reference for hackathon.

ashgillman commented 6 years ago

The key change was:

+  MuMapImageType::PointType outputOrigin;
+  outputOrigin[0] = -static_cast<float>(outputSize[0]) * outputSpacing[0] / 2.;
+  outputOrigin[1] = -static_cast<float>(outputSize[1]) * outputSpacing[1] / 2.;
+  // outputOrigin[0] = _inputImage->GetOrigin()[0];
+  // outputOrigin[1] = _inputImage->GetOrigin()[1];
+  outputOrigin[2] = _inputImage->GetOrigin()[2];

i.e., the umap should be centered transaxially.

ashgillman commented 6 years ago

410141_ute2 hv nac_sirf_s21i30_30 hv