<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://stage.nitrcce.org/themes/nitrc3.0/css/rss.xsl.php?feed=https://stage.nitrcce.org/export/rss20_forum.php?forum_id=9634" ?>
<?xml-stylesheet type="text/css" href="https://stage.nitrcce.org/themes/nitrc3.0/css/rss.css" ?>
<rss version="2.0"> <channel>
  <title>NITRC mri_reface Forum: open-discussion</title>
  <link>http://stage.nitrcce.org/forum/forum.php?forum_id=9634</link>
  <description>General Discussion</description>
  <language>en-us</language>
  <copyright>Copyright 2000-2026 NITRC OSI</copyright>
  <webMaster></webMaster>
  <lastBuildDate>Sat, 11 Apr 2026 3:18:41 GMT</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>NITRC RSS generator</generator>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;Originally posted by Adam Raikes:&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I haven't seen any resolution to this issue, but wanted to give my experience.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I created a Singularity container from the current Docker image for use with the system I have access to. Binding the updated ADIR_nii2dicom.py as /usr/bin/mlrtapp/image_handling/ADIR_nii2dicom.py solved this problem for us.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Adam,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I'm sorry you had to do that. I was waiting for confirmation from Dianne and largely forgot about this.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Today I released a new version 0.3.3 that includes this fix (and some other unrelated ones).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thanks,&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, 17 Nov 2023 22:45:51 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;p&amp;gt;I haven't seen any resolution to this issue, but wanted to give my experience.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I created a Singularity container from the current Docker image for use with the system I have access to. Binding the updated ADIR_nii2dicom.py as /usr/bin/mlrtapp/image_handling/ADIR_nii2dicom.py solved this problem for us.&amp;lt;/p&amp;gt;</description>
   <author>Adam Raikes</author>
   <pubDate>Thu, 02 Nov 2023 18:44:24 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;p&amp;gt;Dianne,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thanks for posting the steps you followed. I followed your steps to create the updated image and I called it mri_reface2, as you did. I then exited and went into mri_reface2 in a new terminal and verified that the updated copy of ADIR_nii2dicom.py was still there.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;$ docker run -ti mri_reface2&amp;lt;br&amp;gt;root@55793afdac4c:/usr/bin/mlrtapp/image_handling# grep xml ADIR_nii2dicom.py&amp;amp;nbsp;&amp;lt;br&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; dcmfiles_temp = [i for i in dcmfiles_temp if not re.search(r'\.xml$', i) ]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The above grep result matches the code I added newly in the revision I attached previously.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I created a new run_mri_reface_docker.sh&amp;amp;nbsp;&amp;lt;br&amp;gt;$ cp run_mri_reface_docker.sh run_mri_reface2_docker.sh&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Which I then edited to replace mri_reface with mri_reface2 in BOTH docker lines:&amp;lt;br&amp;gt;96 docker run -ti --mount type=bind,src\=$tmpdir,target=$tmpdir mri_reface2 run_mri_reface.sh $input $output_tmp ${input_array[@]:2 }&amp;lt;br&amp;gt;97&amp;amp;nbsp;&amp;lt;br&amp;gt;98 docker run -ti --mount type=bind,src=$tmpdir,target=$tmpdir mri_reface2 chmod =777 -R $tmpdi&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;From there I ran it two ways. One was using run_mri_reface2_docker.sh:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;$ ./run_mri_reface2_docker.sh dcm_t1 outExternal -imType T1&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[...]&amp;lt;br&amp;gt;ADIR_ReFace finished in: 17.9749 minutes&amp;lt;br&amp;gt;Finished writing 176 dcm files to outDir: /tmp/tmp.A1n3Oz3nih/outputs/dcm&amp;lt;br&amp;gt;Including custom code sequence: code: &amp;quot;replace_recognizable&amp;quot; meaning: &amp;quot;Replace face, ears, and artifacts in air&amp;quot; designator: &amp;quot;mri_reface&amp;quot; version: &amp;quot;0.3.2&amp;quot;&amp;lt;br&amp;gt;Finished.&amp;lt;br&amp;gt;De-faced DICOM was written to /tmp/tmp.A1n3Oz3nih/outputs/dcm. This DICOM metadata is NOT otherwise de-identified. Only de-facing was performed. If you need the meta-data de-identified also, you should run it through your preferred DICOM de-identification software.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;When it completed, I opened outExternal/dcm and the files are present and successful.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I also tried running the whole thing inside docker, rather than using run_mri_reface2_docker.sh&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;$ chmod a+wrX .&amp;lt;br&amp;gt;$ docker run -ti --mount type=bind,src=${PWD},target=/host mri_reface2&amp;lt;br&amp;gt;root@23aadd07062d:/usr/bin/mlrtapp/image_handling# cd /host&amp;lt;br&amp;gt;root@23aadd07062d:/host# run_mri_reface.sh dcm_t1 out2 -imType T1&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;[...]&amp;lt;br&amp;gt;ADIR_ReFace finished in: 17.8532 minutes&amp;lt;br&amp;gt;Finished writing 176 dcm files to outDir: out2/dcm&amp;lt;br&amp;gt;Including custom code sequence: code: &amp;quot;replace_recognizable&amp;quot; meaning: &amp;quot;Replace face, ears, and artifacts in air&amp;quot; designator: &amp;quot;mri_reface&amp;quot; version: &amp;quot;0.3.2&amp;quot;&amp;lt;br&amp;gt;Finished.&amp;lt;br&amp;gt;De-faced DICOM was written to out2/dcm. This DICOM metadata is NOT otherwise de-identified. Only de-facing was performed. If you need the meta-data de-identified also, you should run it through your preferred DICOM de-identification software.&amp;lt;br&amp;gt;root@23aadd07062d:/host# exit&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Then I checked out2/dcm. The dcm files are present and valid.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I tried again using your dicom directory name, just in case that had something to do with it:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;$ ./run_mri_reface2_docker.sh T1_mprage_1mm_13/ out -imType T1&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;And that was also successful.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;From here, I was at a bit of a loss. My best guess was that there's a mistake in one of the steps you didn't show me. Maybe you could verify that your mri_reface2 image has the updated code (via the above grep example), and you could verify that your run_mri_reface2_docker.sh replaced 'mri_reface' in BOTH 'docker' commands with 'mri_reface2'?&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Toward that hypothesis, I looked back at the start of your pdf and I think you may not have replaced the correct file/path.&amp;amp;nbsp;&amp;lt;br&amp;gt;/usr/bin/mlrtapp has ADIR_nii2dicom, a program. It also has a subdirectory called image_handling. Inside image_handling is ADIR_nii2dicom.py. I intended for you to replace /usr/bin/mlrtapp/image_handling/ADIR_nii2dicom.py, NOT /usr/bin/mlrtapp/ADIR_nii2dicom, but it looks like you replaced ADIR_nii2dicom. I surprised that didn't up with a new error message when you tried to run it that way, but otherwise I think this explains why it's now working for me, but not you.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Can you please try starting again from the original mri_reface image and copy the new ADIR_nii2dicom.py into image_handling, this time? From there, I hope it will work for you. Please let me know. Sorry my original instructions weren't clear enough about which file to replace.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thanks,&amp;lt;br&amp;gt;Chris&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Tue, 13 Jun 2023 0:30:34 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&lt;p&gt;The dcm directory is empty again.&amp;nbsp; I'm attaching a pdf that details my steps for testing.&lt;br&gt;My revised container works fine on NIfTI input, but continues to refuse to generate the revised DICOM files.&amp;nbsp;&amp;nbsp;&lt;/p&gt;</description>
   <author>Dianne Patterson</author>
   <pubDate>Fri, 09 Jun 2023 20:10:57 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;p style=&amp;quot;line-height: 1;&amp;quot;&amp;gt;Dianne,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;line-height: 1;&amp;quot;&amp;gt;I think I found the issue. Could you please try swapping in the attached copy of ADIR_nii2dicom.py for the one in mri_reface/ADIR_nii2dicom/ADIR_nii2dicom and see if that solves it for you? If it does, we can make this change in the next version.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;line-height: 1;&amp;quot;&amp;gt;&amp;lt;br&amp;gt;Thanks,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;line-height: 1;&amp;quot;&amp;gt;Chris&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Wed, 07 Jun 2023 15:39:56 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;div class=&amp;quot;elementToProof ContentPasted1&amp;quot;&amp;gt;Is this the issue?&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;elementToProof ContentPasted1&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;elementToProof ContentPasted1&amp;quot;&amp;gt;&amp;lt;a id=&amp;quot;LPlnk972631&amp;quot; href=&amp;quot;https://github.com/nipy/heudiconv/issues/648&amp;quot;&amp;gt;https://github.com/nipy/heudiconv/issues/648&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;elementToProof&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;Signature&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;lt;div&amp;gt;-Dianne&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;</description>
   <author>Dianne Patterson</author>
   <pubDate>Tue, 06 Jun 2023 20:31:52 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;p&amp;gt;Dianne,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I was able to download your dicom and reproduce your error. I get the same error when I simply run dcm2niix on the dicom, then ADIR_nii2dicom on the nii with the original dicom. So, the error isn't in the de-facing at all but just in converting from dicom-&amp;amp;gt;nii and nii-&amp;amp;gt;dicom with these particular inputs. We'll debug from here and get back to you soon.&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Chris&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;$ dcm2niix -o dcm2niix ./MRIS/dicom/219/itbs/T1_mprage_1mm_13&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Chris Rorden's dcm2niiX version v1.0.20221013 &amp;amp;nbsp;(JP2:OpenJPEG) GCC4.8.5 x86-64 (64-bit Linux)&amp;lt;br&amp;gt;Found 176 DICOM file(s)&amp;lt;br&amp;gt;Convert 176 DICOM as dcm2niix/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13a (256x256x176x1)&amp;lt;br&amp;gt;Conversion required 1.046187 seconds (0.340000 for core code).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;$ ADIR_nii2dicom dcm2niix/T1_mprage_1mm_13_T1_mprage_1mm_20180706110327_13.nii dcm2niix/nii2dicom ./MRIS/dicom/219/itbs/T1_mprage_1mm_13&amp;lt;br&amp;gt;Traceback (most recent call last):&amp;lt;br&amp;gt;&amp;amp;nbsp; File &amp;quot;/bin/ADIR_nii2dicom&amp;quot;, line 72, in &amp;amp;lt;module&amp;amp;gt;&amp;lt;br&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp; nii2dicom(args['&amp;amp;lt;nii&amp;amp;gt;'], args['&amp;amp;lt;outDir&amp;amp;gt;'], args['&amp;amp;lt;originalDicomDir&amp;amp;gt;'],verbose=args.get('--verbose',False),sliceDim=int(args.get('--sliceDim')),modality_default=str(args.get('--modality')),manufacturer_default=str(args.get('--manufacturer')),photometric_default=str(args.get('--photometric')),dry_run=args.get('--dry-run',False),uid_root=str(args.get('--UID_ROOT')),seriesNUM_select=args.get('--seriesNUM_select',None),seriesUID_select=args.get('--seriesUID_select',None))&amp;lt;br&amp;gt;&amp;amp;nbsp; File &amp;quot;ADIR_nii2dicom.py&amp;quot;, line 110, in nii2dicom&amp;lt;br&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp; dicom_0 = dicom.dcmread(gzip.open(dcmfiles[0],mode='rb')) if(dcmfiles[0][-3:] == '.gz') else dicom.dcmread(dcmfiles[0])&amp;lt;br&amp;gt;IndexError: list index out of range&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Tue, 06 Jun 2023 19:06:22 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;p&amp;gt;Thank you for developing this nice tool...and for being willing to look into it.&amp;amp;nbsp; I hope you have a great holiday.&amp;lt;/p&amp;gt;</description>
   <author>Dianne Patterson</author>
   <pubDate>Wed, 31 May 2023 2:53:13 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Jittery Dicoms</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14373&amp;forum_id=9634</link>
   <description>&amp;lt;p&amp;gt;That sounds interesting! Do you have a way to de-identify and send the dicoms for us to take a look at? I'm on holiday this week but could take a look next week, if you're able to send them. Otherwise, all I can say is we haven't seen that or heard of anything similar, before. ADIR_nii2dicom has its source code provided, so if you're comfortable with code you could try to take a look as well. We've tried to make it as robust as we can, but there's a seemingly infinite number of unusual dicom quirks in the world. If you know of a different nii2dicom converter, that'd work too, but I'm also not aware of a robust alternative that attempts to preserve the unrelated tags, as ours does.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Chris Schwarz&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Tue, 30 May 2023 23:39:54 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14373&amp;forum_id=9634</guid>
  </item>
  <item>
   <title>RE: Trying Docker version</title>
   <link>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</link>
   <description>&amp;lt;p&amp;gt;Dianne,&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Thanks for posting the DICOMs. I'm on holiday this week, but I can download them and take a look when I return next week. I will get back to you. Sorry for the trouble.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Chris Schwarz&amp;lt;/p&amp;gt;</description>
   <author>Christopher Schwarz</author>
   <pubDate>Tue, 30 May 2023 23:33:58 GMT</pubDate>
   <guid>http://stage.nitrcce.org/forum/forum.php?thread_id=14364&amp;forum_id=9634</guid>
  </item>
 </channel>
</rss>
