<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.nitrc.org/themes/nitrc3.0/css/rss.xsl.php?feed=https://www.nitrc.org/export/rss20_forum.php?forum_id=9635" ?>
<?xml-stylesheet type="text/css" href="https://www.nitrc.org/themes/nitrc3.0/css/rss.css" ?>
<rss version="2.0"> <channel>
  <title>NITRC mri_reface Forum: help</title>
  <link>http://www.nitrc.org/forum/forum.php?forum_id=9635</link>
  <description>Get Public Help</description>
  <language>en-us</language>
  <copyright>Copyright 2000-2026 NITRC OSI</copyright>
  <webMaster></webMaster>
  <lastBuildDate>Tue, 17 Nov 2026 22:12:29 GMT</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>NITRC RSS generator</generator>
  <item>
   <title>RE: DICOM attributes modified by mri_reface</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16090&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;Dear Chris&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thank you for the detailed explanation. I saw from the code it misses out anything that varies per slice, so I figured that was the reasoning. Also, it makes sense that the pixel-related attributes have to change because the image was modified (not just changing the face, but I think nibabel by default converts everything to float).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As you say, the per-image CSA header is useful for things like DWI (maybe ASL too) and we're not defacing those. The LONI deidentification protocol says to preserve this tag, but I agree it's probably not needed for the images we reface. There are some defaced images already in LONI so I'll see if those have Siemens CSA header at image level.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Kudos on working on a deeper DICOM pixel replacer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thanks again.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Paul&amp;lt;/p&amp;gt;</description>
   <author>Paul Wright</author>
   <pubDate>Mon, 02 Nov 2026 8:17:41 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16090&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>RE: DICOM attributes modified by mri_reface</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16090&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;Paul,&amp;lt;br&amp;gt;The ADIR_nii2dicom software we include+use in 0.3.x is writing new DICOM from the de-faced .nii, then copying only what it confidently knows won't mismatch with the newly created DICOM. So, InstanceNumber 1 may be entirely a different part of the image and could even be sliced with a totally different orietnation, vs. the original InstanceNumber 1. It's not trying to replace only PixelData or necessarily figure out/match the original ordering in the orignial DICOM. Bits, creation time, SOPInstanceUID, LargestImagePixelValue are all modified to be correct for the new data.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For the CSA, that comes back to &amp;quot;only what it confidently knows won't mismatch with the newly created DICOM.&amp;quot; It only copies the tags that are completely consistent within each volume (not necessarily in the whole series but at least in each volume). For the CSA, since it's a binary, we don't have a way to remove only certain parts. If anything in the CSA includes some info that varies for each slice (e.g. slice timing, max intensities, things like that), the whole thing is gone. The whole thing is not a perfect system but it preserves quite a bit more than any of the other nii-&amp;amp;gt;DICOM converters/replacers I was able to find at the time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;These challenges and others are why we've been rewriting the whole thing ground-up with an alternate approach &amp;quot;ADIR_DicomPixelReplacer&amp;quot; that probably works more like you're expecting. It also supports enhanced DICOM natively, which we needed for our Philips MEGRE support. With the new function, we'll be able to keep more tags more consistently, since it will decidedly preserve the original slice orderings. So for this, I acknowledge that we can do better, and we'll have that soon!&amp;amp;nbsp;On the other hand, it wasn't a big priority because AFAIK there's nothing too important in the CSA for the image types that we de-face. If we de-faced diffusion it would be different, but fortunately we don't have to. The need for the rewrite was mainly driven by Philips MEGRE not getting valid dcm2niix outputs after dcuncat.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;As for copying tags back post-hoc, there's probably at least one line of the CSA that won't be accurate anymore when you do that. How problematic that is vs. removing it entirely is up to you to assess. Certainly you shouldn't copy back the &amp;quot;modified&amp;quot; set of tags as those are changed for a good reason.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Chris&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Fri, 30 Oct 2026 21:14:51 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16090&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>DICOM attributes modified by mri_reface</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16090&amp;forum_id=9635</link>
   <description>&lt;p&gt;Greetings Dr Schwarz et al.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I just started testing mri_reface on DICOM images. I had some questions about the conversion process.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Several DICOM attributes are modified. Some are logging that deidentification was done (0012,006x). Others I'm less sure about. Leaving out the former, I saw these changes in my test image:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;(0008,0013) InstanceCreationTime: deleted&lt;br&gt;(0008,0018) SOPInstanceUID: modified [redacted]&lt;br&gt;(0008,0033) ContentTime: deleted&lt;br&gt;(0019,1015) Private [Siemens MR header: SlicePosition_PCS]: deleted&lt;br&gt;(0020,1041) SliceLocation: deleted&lt;br&gt;(0028,0101) BitsStored: modified 12 -&amp;gt; 16&lt;br&gt;(0028,0102) HighBit: modified 11 -&amp;gt; 15&lt;br&gt;(0028,0103) PixelRepresentation: modified 0 -&amp;gt; 1&lt;br&gt;(0028,0107) LargestImagePixelValue: modified 11 -&amp;gt; 10&lt;br&gt;(0028,1050) WindowCenter: deleted&lt;br&gt;(0028,1051) WindowWidth: deleted&lt;br&gt;(0029,1010) Private [Siemens CSA header: CSAImageHeaderInfo]: deleted&lt;br&gt;(0051,100D) Private [Siemens MR header: SlicePositionText]: deleted&lt;br&gt;(0054,0081) NumberOfSlices: added -&amp;gt; 176&lt;br&gt;(0054,0101) NumberOfTimeSlices: added -&amp;gt; 1&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;The SOP instance UID makes sense: it says the instance was created by pydicom.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I think the (0028,010x) tags are modified because the pixel data are converted to float when read into nibabel. The largest value could change if the slice includes a face voxel (this is slice 1, so it's probably low because it's mostly air).&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;The private tag (0029,1010) Siemens CSA header: CSAImageHeaderInfo is listed as preserved in the LONI deidentification protocol (not required though).&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I'm considering restoring some of these in a separate postprocessing pass. Can you comment on this, particularly is replacing any tags may be invalid.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Many thanks&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Paul&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
   <author>Paul Wright</author>
   <pubDate>Thu, 29 Oct 2026 9:57:44 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16090&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>RE: Using a custom atlas</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16031&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;Paul,&amp;lt;br&amp;gt;The current release does not have a command-line argument to replace the template. It's a reasonable feature to add for expert users who can create a template that has sufficiently aligned anatomy but want to match their specific scanners/sequences, but it's not something I'd ever thought of, and I thank you for the suggestion. The only way I can think of is that Matlab's compiled binary `mri_reface` is a .zip and can be opened with .zip file readers, so maybe you could swap in a different MCALT_FaceTemplate_T1.nii with the same name and spatially aligned anatomy, but I'm not sure whether or not Matlab's runtime libraries would refuse to run it. There's probably a checksum or something like that.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;We are currently validating a new major version/feature where the replacement voxels much better match the intensity profiles of the original, and the early results are very promising. I think this will meet your needs soon-ish. For 0.3.x, it's true that sometimes the replacement face voxel intensity could be better matched in some sequences/tracers, but we've also found this to have pretty minimal effects on brain measurements and the deviations are still smaller than with other programs that don't really attempt to match the intensities in the first place.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Chris&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Mon, 29 Jun 2026 19:29:36 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16031&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>Using a custom atlas</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16031&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;Hi Chris,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Is it possible to use a custom atlas with mri_reface? I know the -faceMask argument will accept a custom set of masks. I would like to replace the group mean T1w image, from which the replacement voxels are taken. If there isn't a CLI argument for this, is there another way to swap out the images at runtime?&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;What I'm trying to do is match the intensity profile, as the replacement voxels from the MCALT atlas tend to be brighter than those in my dataset. So I can achieve this even if the atlases match spatially. I see the MCALT atlas repo includes the steps to create the atlas. It looks similar to what I've done before with DARTEL, with an intensity adjustment step. So assuming I can create the atlas, can I use it with mri_reface?&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many thanks&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Paul&amp;lt;/p&amp;gt;</description>
   <author>Paul Wright</author>
   <pubDate>Thu, 25 Jun 2026 15:16:40 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16031&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>RE: Basic setup and usage for native Mac and Linux</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;Kazim,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I'm sorry, I have limited ability to help you here. I've never tried to do this in Windows or ever used WSL. run_mri_reface_docker.sh is bash code, so you can view and/or modify the source if some changes are needed for your WSL environment.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br&amp;gt;In this line,&amp;amp;nbsp;&amp;lt;br&amp;gt;File not found: C:/Users/kjafri/AppData/Local/Temp/tmp.hiSWIStylc/inputs/input&amp;lt;br&amp;gt;we are seeing a windows-style path: (&amp;quot;C:/&amp;quot;) rather than a Linux-style path (&amp;quot;/c/&amp;quot;). The error is coming from inside the Docker, so we shouldn't be seeing a path like that. My best guess is that mktemp -d (line 56 of run_mri_reface_docker.sh) is not behaving appropriately for the WSL/MINGW/Linux-emulating environment. This probably means that you have an environment value $TMPDIR that contains something like &amp;quot;C:/&amp;quot; when inside WSL you want something like &amp;quot;/c/&amp;quot; (or nothing at all, and let it be the default). You appear to be using some sort of AI-based translation layer (&amp;quot;Gordon&amp;quot;), and it may be the culpret of making changes to your environment (TMPDIR) that aren't appropriate here.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br&amp;gt;Chris&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Thu, 04 Jun 2026 23:52:56 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>RE: Basic setup and usage for native Mac and Linux</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;I gave up on the manual compiling setup as I kept facing issues regarding implementation (not being able to find entities, etc.). So, I tried setting up the docker environment on Windows by leveraging WSL. There was no problem with setting up the image, but when I attempt to run the .sh, I get the following errors.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding-left: 80px;&amp;quot;&amp;gt;PHILADELPHIA+kjafri@RST-LTKJAFRI MINGW64 ~/Downloads/mri_reface_docker&amp;lt;br&amp;gt;$ bash run_mri_reface_docker.sh /c/Users/kjafri/Downloads/mri_reface_docker/input /c/Users/kjafri/Downloads/mri_reface_docker/output&amp;lt;br&amp;gt;Error using ADIR_ReFace&amp;lt;br&amp;gt;File not found: C:/Users/kjafri/AppData/Local/Temp/tmp.hiSWIStylc/inputs/input&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;padding-left: 80px;&amp;quot;&amp;gt;What's next:&amp;lt;br&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp; Debug this container error with Gordon &amp;amp;rarr; docker ai &amp;quot;help me fix this container error&amp;quot;&amp;lt;br&amp;gt;cp: cannot stat '/tmp/tmp.hiSWIStylc/outputs/*': No such file or directory&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I'm wondering if you can provide some insights as to where I may be going wrong.&amp;lt;/p&amp;gt;</description>
   <author>Kazim Jafri</author>
   <pubDate>Thu, 04 Jun 2026 17:57:31 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>RE: Basic setup and usage for native Mac and Linux</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;It's not something I remember encountering in the one time (so far) that I built this on Apple. When I Google your error, it suggests that disabling SSE would probably remove the Intel-specific flag. The niftyreg functionality mri_reface is using doesn't require any of the optional features, so for any niftyreg build problems I would disable whatever you can via cmake (here, SSE, but if errors with libjpeg, disable jpeg, etc.) and try again. The &amp;quot;ccmake&amp;quot; GUI interface to cmake would help you see what options are available.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Chris&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Wed, 03 Jun 2026 16:37:31 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>RE: Basic setup and usage for native Mac and Linux</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</link>
   <description>&lt;p&gt;Hi Chris,&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I running across some errors and I was hoping you could help.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I cloned both repos (ANTS and Niftyreg) into our home directory, created the build folders, but ran into an error for niftyreg:&lt;/p&gt;&lt;br /&gt;
&lt;p style=&quot;padding-left: 80px;&quot;&gt;&amp;nbsp;corelabadmin@Corelab-Mac-Studio01-PRD build % make&lt;br&gt;[ &amp;nbsp;1%] Building CXX object reg-lib/CMakeFiles/_reg_maths.dir/cpu/Maths.cpp.o&lt;br&gt;clang++: error: unsupported option '-msse3' for target 'arm64-apple-darwin25.5.0'&lt;br&gt;make[2]: *** [reg-lib/CMakeFiles/_reg_maths.dir/cpu/Maths.cpp.o] Error 1&lt;br&gt;make[1]: *** [reg-lib/CMakeFiles/_reg_maths.dir/all] Error 2&lt;br&gt;make: *** [all] Error 2&lt;br&gt;corelabadmin@Corelab-Mac-Studio01-PRD build % cd ..&lt;br&gt;corelabadmin@Corelab-Mac-Studio01-PRD niftyreg % cd ..&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I suspect that it is anticipating x86 architecture instead of the more recent ARM architecture on Mac computers.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Any help that can be provided would be appreciated.&lt;/p&gt;</description>
   <author>Kazim Jafri</author>
   <pubDate>Wed, 03 Jun 2026 15:41:41 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16014&amp;forum_id=9635</guid>
  </item>
  <item>
   <title>RE: PET refacing</title>
   <link>http://www.nitrc.org/forum/forum.php?thread_id=16020&amp;forum_id=9635</link>
   <description>&amp;lt;p&amp;gt;Paul,&amp;lt;br&amp;gt;At this time, FBB and FBP are doing the same thing behind the scenes. PIB and NAV use one template based on PIB, and the other F18 tracers use another template based on FBP. It's possible that some future version may need to differentiate them, but currently that pair are treated the same internally.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;br&amp;gt;Chris&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Tue, 02 Jun 2026 16:50:05 GMT</pubDate>
   <guid>http://www.nitrc.org/forum/forum.php?thread_id=16020&amp;forum_id=9635</guid>
  </item>
 </channel>
</rss>
