<div dir="ltr"><div dir="ltr">Hi Alfredo,<div><br></div><div>see below in blue for answers to the different cases.</div><div><br></div><div>Hope that will help,</div><div><br></div><div>Cécile</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 2, 2019 at 1:33 PM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu" target="_blank">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi Cécile,
<div><br>
</div>
<div>Apparently the changes we made, fixed StudyInstanceUID and StudyID, worked as we don’t see the error “The target directory does not contain a single DICOM file” anymore. However, now I am getting the following error for all the cases that were
fixed:</div>
<div><br>
</div>
<div>----------------------------------</div>
<div><font face="Courier New" color="#000000"><span style="font-variant-ligatures:normal;white-space:pre-wrap;background-color:rgb(255,255,255)">Running now the following command: /xxx/bin/mri/uploadNeuroDB/</span><a rel="noreferrer" href="http://imaging_upload_file.pl/" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:rgb(255,255,255);font-variant-ligatures:normal;white-space:pre-wrap" target="_blank">imaging_upload_file.pl</a><span style="font-variant-ligatures:normal;white-space:pre-wrap;background-color:rgb(255,255,255)">
-profile prod -upload_id 20925 /yyy/AAA10001_111222_baseline.tar.gz -verbose Spool message is: The Scan for the uploadID 20925 has already been run with tarchiveID: 20738. To continue with the rest of the insertion pipeline, please run tarchiveLoader from
a terminal as follows: /xxx/bin/mri/uploadNeuroDB/tarchiveLoader -globLocation -profile prod /yyy/data/tarchive/DCM_2011-08-19_ImagingUpload-9-52-PPfWPd.tar -verbose</span></font></div>
<div>----------------------------------<br></div></div></blockquote><div><br></div><div><font color="#0000ff">The important message is "The Scan for the uploadID 20925 has already been run with tarchiveID: 20738.". This means that there is already a study that was inserted in the tarchive tables that is using the same StudyInstanceUID as the one being uploaded. So you would need to generate new <b>unique</b> StudyInstanceUID per DICOM study you wish to upload (since as I understand, that field has been erased for ethical purposes). Each StudyInstanceUID has to be unique otherwise the pipeline thinks you are trying to upload a duplicate dataset.</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">FYI - The terminal output with the tarchiveLoader command is actually suggesting to run the tarchiveLoader on the previous upload that was found to have the same StudyInstanceUID (and that has tarchiveID=20738 associated with the previous upload).</font></div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
<div>When I run the suggested command line I get the following message:</div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
<div><br>
</div>
<div>----------------------------------</div>
<div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">$ /xxx/bin/mri/uploadNeuroDB/tarchiveLoader -globLocation -profile prod /yyy/data/tarchive/DCM_2011-08-19_ImagingUpload-9-52-PPfWPd.tar -verbose</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New"><br>
</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">md5sum /yyy/data/tarchive/DCM_2011-08-19_ImagingUpload-9-52-PPfWPd.tar</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New"><br>
</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">PSCID is: AAA10001</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New"> CandID id: 111222</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New"> visit_label is: baseline</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures">candidate id </span>111222</font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures">PSCID is: </span>AAA10001</font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures"> CandID id: </span>111222</font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New"> visit_label is: baseline</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">WARNING: Age was not numeric!!</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">WARNING: Age was not numeric!!</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">WARNING: Age was not numeric!!</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">WARNING: Age was not numeric!!</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">WARNING: Age was not numeric!!</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Error reading file.</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Mincinfo_wrapper: crashed while running mincinfo (termination status=256)</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Error reading file.</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Mincinfo_wrapper: crashed while running mincinfo (termination status=256)</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Error reading file.</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Mincinfo_wrapper: crashed while running mincinfo (termination status=256)</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Error reading file.</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Mincinfo_wrapper: crashed while running mincinfo (termination status=256)</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Error reading file.</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Mincinfo_wrapper: crashed while running mincinfo (termination status=256)</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0);min-height:13px">
<font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures"></span><br>
</font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">Number of MINC files that will be considered for inserting into the database: 0</font></span></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0);min-height:13px">
<font face="Courier New"><span style="font-variant-ligatures:no-common-ligatures"></span><br>
</font></div>
<div style="margin:0px;font-stretch:normal;line-height:normal;color:rgb(0,0,0)">
<span style="font-variant-ligatures:no-common-ligatures"><font face="Courier New">No data could be converted into valid MINC files. Localizers will not be considered!</font></span></div>
</div>
<div>----------------------------------</div>
<div><br>
</div>
<div>I tested the conversion of one the DICOM folder to minc and then executed mincinfo but I didn’t get any errors. </div>
<div><br>
</div>
<div>Do you know why this might be happening?</div></div></div></blockquote><div><br></div><div><font color="#0000ff">Is it possible that the encoding of the DICOMs are not "little endian explicit" by any chance? If that is the case, you would need to convert them so that the encoding is "little endian explicit".</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">FYI: command to convert the encoding of the DICOMs</font></div><div><font color="#0000ff"><span style="font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">find <root_of_my_DICOM_files_</span><span style="font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">directory> -type f | xargs -i dcmconv --write-xfer-little {} {}</span><br></font></div><div> </div><div><font color="#0000ff">Once done, you would need to remove the partial upload and reupload. This can be done using the <a href="http://delete_imaging_upload.pl">delete_imaging_upload.pl</a> script in the tools directory. Run the -h option and you will see the explanation on how this script can be run and detailed information about the options.</font></div><div><font color="#0000ff"><br></font></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
<div>Is there an issue with the files created by LORIS in the first attempt I tried to upload these images (see uploadId 20925)?</div>
<div><br>
</div>
<div>Let me know if you need more information from my side to help overcome this issue.</div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
<div><br>
</div>
<div>Best regards,</div>
<div>Alfredo.</div>
<div><br>
<blockquote type="cite">
<div>On Nov 25, 2019, at 10:25 AM, Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@BWH.HARVARD.EDU" target="_blank">AMORALESPINZON@BWH.HARVARD.EDU</a>> wrote:</div>
<br>
<div>
<div>
Hi Cécile,
<div><br>
</div>
<div>Thank you for your prompt response. We will make the changes, try again, and report back to this thread.</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Alfredo.<br>
<div><br>
<blockquote type="cite">
<div>On Nov 25, 2019, at 10:06 AM, Cecile Madjar <<a href="mailto:cecile.madjar@mcin.ca" target="_blank">cecile.madjar@mcin.ca</a>> wrote:</div>
<br>
<div>
<p><span style="padding:3px 10px;border-radius:5px;color:rgb(255,255,255);font-weight:bold;display:inline-block;background-color:rgb(255,0,0)"> External Email - Use Caution </span></p>
<div><br>
</div>
<div dir="ltr">Hi Alfredo,
<div><br>
</div>
<div>Indeed, the StudyInstanceUID needs to have a value for the insertion pipeline to work so that could explain the no DICOM found error. </div>
<div><br>
</div>
<div>FYI - StudyInstanceUID also needs to be unique for each uploaded study otherwise insertion in the tarchive tables would fail with the error: "the study has already been uploaded"</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div><br>
</div>
<div>Cécile</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2019 at 10:02 AM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu" target="_blank">AMORALESPINZON@bwh.harvard.edu</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div dir="auto">
<div dir="auto">
<div>Dear LorisDev team,</div>
<div><br>
</div>
<div>I am batch uploading images to imaging visits using the script batch_uploads_imageuploader but for some images I get the following error:</div>
<div><br>
</div>
<div><b>The target directory does not contain a single DICOM file.</b></div>
<div><br>
</div>
<div>I had seen this error previously due to missing dicom fields like StudyID (0020,0010) and ImagePositionPatient (0020,0032). However, after checking these particular dicom fields and setting StudyID it to '0' I am still getting the same error.
What other dicom fields should I check?</div>
<div><br>
</div>
<div>Is there a log where I can exactly find the error? Does the "StudyInstanceUID" need to have a value?</div>
<div><br>
</div>
<div>I'm pasting the dcmdump of a dicom at the end of this email in case this might help figuring out what is the issue.</div>
<div><br>
</div>
<div>I am using LORIS <a href="mailto:v@20.1.1." target="_blank">
v@20.1.1.</a></div>
<div><br>
</div>
<div>Thank you in advance for your help.</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Alfredo.</div>
<div><br>
</div>
<div>--------------------------------------------------------------------------------------</div>
<div><br>
</div>
<div># Dicom-File-Format</div>
<div><br>
</div>
<div># Dicom-Meta-Information-Header</div>
<div># Used TransferSyntax: Little Endian Explicit</div>
<div>(0002,0000) UL 230 # 4, 1 FileMetaInformationGroupLength</div>
<div>(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion</div>
<div>(0002,0002) UI =MRImageStorage # 26, 1 MediaStorageSOPClassUID</div>
<div>(0002,0003) UI [1.2.826.0.1.3680043.2.1125.1.62497394598874749597838823223385071] # 64, 1 MediaStorageSOPInstanceUID</div>
<div>(0002,0010) UI =LittleEndianImplicit # 18, 1 TransferSyntaxUID</div>
<div>(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.0] # 28, 1 ImplementationClassUID</div>
<div>(0002,0013) SH [OFFIS_DCMTK_360] # 16, 1 ImplementationVersionName</div>
<div>(0002,0016) AE [GDCM/ITK 3.17.0] # 16, 1 SourceApplicationEntityTitle</div>
<div><br>
</div>
<div># Dicom-Data-Set</div>
<div># Used TransferSyntax: Little Endian Implicit</div>
<div>(0008,0008) CS [DERIVED\SECONDARY] # 18, 2 ImageType</div>
<div>(0008,0016) UI =MRImageStorage # 26, 1 SOPClassUID</div>
<div>(0008,0018) UI [1.2.826.0.1.3680043.2.1125.1.62497394598874749597838823223385071] # 64, 1 SOPInstanceUID</div>
<div>(0008,0020) DA [20000101] # 8, 1 StudyDate</div>
<div>(0008,0021) DA [20000101] # 8, 1 SeriesDate</div>
<div>(0008,0022) DA [20000101] # 8, 1 AcquisitionDate</div>
<div>(0008,0030) TM (no value available) # 0, 0 StudyTime</div>
<div>(0008,0031) TM [085517] # 6, 1 SeriesTime</div>
<div>(0008,0032) TM [085517] # 6, 1 AcquisitionTime</div>
<div>(0008,0060) CS [MR] # 2, 1 Modality</div>
<div>(0008,0070) LO [AAABBBCCC] # 6, 1 Manufacturer</div>
<div>(0008,0104) LO [Anonymized] # 10, 1 CodeMeaning</div>
<div>(0008,103e) LO [t1c] # 4, 1 SeriesDescription</div>
<div>(0008,1090) LO [nifti2dicom] # 12, 1 ManufacturerModelName</div>
<div>(0010,0010) PN [10041] # 6, 1 PatientName</div>
<div>(0010,0020) LO [10041] # 6, 1 PatientID</div>
<div>(0010,0021) LO [Anonymized] # 10, 1 IssuerOfPatientID</div>
<div>(0010,0030) DA [19650101] # 8, 1 PatientBirthDate</div>
<div>(0010,0040) CS [Anonymized] # 10, 1 PatientSex</div>
<div>(0010,1010) AS [Anonymized] # 10, 1 PatientAge</div>
<div>(0010,1030) DS (no value available) # 0, 0 PatientWeight</div>
<div>(0010,2150) LO [Anonymized] # 10, 1 CountryOfResidence</div>
<div>(0010,2152) LO [Anonymized] # 10, 1 RegionOfResidence</div>
<div>(0010,21f0) LO [Anonymized] # 10, 1 PatientReligiousPreference</div>
<div>(0012,0050) LO [baseline] # 8, 1 ClinicalTrialTimePointID</div>
<div>(0012,0062) CS [Yes] # 4, 1 PatientIdentityRemoved</div>
<div>(0012,0063) LO [Genentech] # 10, 1 DeidentificationMethod</div>
<div>(0018,0050) DS [3] # 2, 1 SliceThickness</div>
<div>(0018,0088) DS [3] # 2, 1 SpacingBetweenSlices</div>
<div>(0020,000d) UI (no value available) # 0, 0 StudyInstanceUID</div>
<div>(0020,000e) UI [1.2.826.0.1.3680043.2.1143.2737712182581015462892759360372011946] # 64, 1 SeriesInstanceUID</div>
<div><b>(0020,0010) SH [0] # 2, 1 StudyID</b></div>
<div>(0020,0011) IS [901] # 4, 1 SeriesNumber</div>
<div>(0020,0012) IS [1] # 2, 1 AcquisitionNumber</div>
<div>(0020,0013) IS [1] # 2, 1 InstanceNumber</div>
<div>(0020,0020) CS [L\R] # 4, 2 PatientOrientation</div>
<div>(0020,0032) DS [-116.48152160645\-118.93698120117\-275.82513427734] # 50, 3 ImagePositionPatient</div>
<div>(0020,0037) DS [1\0\0\0\1\0] # 12, 6 ImageOrientationPatient</div>
<div>(0020,0052) UI [1.2.826.0.1.3680043.2.1143.263896814292546686535778822643473818] # 64, 1 FrameOfReferenceUID</div>
<div>(0028,0002) US 1 # 2, 1 SamplesPerPixel</div>
<div>(0028,0004) CS [MONOCHROME2] # 12, 1 PhotometricInterpretation</div>
<div>(0028,0010) US 256 # 2, 1 Rows</div>
<div>(0028,0011) US 256 # 2, 1 Columns</div>
<div>(0028,0030) DS [1\1] # 4, 2 PixelSpacing</div>
<div>(0028,0100) US 16 # 2, 1 BitsAllocated</div>
<div>(0028,0101) US 16 # 2, 1 BitsStored</div>
<div>(0028,0102) US 15 # 2, 1 HighBit</div>
<div>(0028,0103) US 1 # 2, 1 PixelRepresentation</div>
<div>(0032,1033) LO [Anonymized] # 10, 1 RequestingService</div>
<div>(0040,0280) ST [Anonymized] # 10, 1 CommentsOnThePerformedProcedureStep</div>
<div>(0400,0563) LO [Anonymized] # 10, 1 ModifyingSystem</div>
<div>(0400,0564) LO [Anonymized] # 10, 1 SourceOfPreviousValues</div>
<div>(0400,0565) CS [Anonymized] # 10, 1 ReasonForTheAttributeModification</div>
<div>(1110,21b0) ?? 0a\00 # 2, 1 Unknown Tag & Data</div>
<div>(7fe0,0010) OW 0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000\0000... # 131072, 1 PixelData</div>
</div>
</div>
<div><br>
</div>
<p>The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.</p>
</div>
_______________________________________________<br>
Loris-dev mailing list<br>
<a href="mailto:Loris-dev@bic.mni.mcgill.ca" target="_blank">Loris-dev@bic.mni.mcgill.ca</a><br>
<a href="https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev" rel="noreferrer" target="_blank">https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev</a><br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote></div></div>