<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">Hi Alfredo,
<div><br>
</div>
<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Could you please help me inserting those files which are different in size and md5 from previous uploaded files?
</blockquote>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The only similarity between the previous uploaded files and the ones that could not be uploaded is the filename.</blockquote>
<div><br>
</div>
To provide a quick answer (since most of our imaging team is on vacation this week) : </div>
<div><br>
</div>
<div>
<div>Yes the MD5hash seems to require a unique filename (* below).</div>
</div>
<div>
<div>Can you use distinct filenames ? i.e. Are you are trying to load additional data for a participant session (i.e. same IDs and visit label) ? </div>
<div>Or, are you trying to load more than one participant/session at a time? </div>
</div>
<div><br>
</div>
<div>(*) This line in the actual <a href="https://github.com/aces/Loris-MRI/blob/master/uploadNeuroDB/NeuroDB/MRIProcessingUtility.pm#L617">
MRIProcessingUtility library</a>: (around Line 617)<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">$md5hash</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre;background-color:rgb(255,251,221)">
= &NeuroDB::MRI::compute_hash(\</span><span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">$file</span><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre;background-color:rgb(255,251,221)">);</span></blockquote>
<div>and
<table class="gmail-highlight gmail-tab-size gmail-js-file-line-container" style="box-sizing:border-box;border-collapse:collapse;border-spacing:0px;color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px">
<tbody style="box-sizing:border-box">
<tr style="box-sizing:border-box">
</tr>
<tr style="box-sizing:border-box">
<td id="gmail-LC622" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">my</span>
<span class="gmail-pl-smi" style="box-sizing:border-box">$unique</span> = &NeuroDB::MRI::is_unique_hash(\<span class="gmail-pl-smi" style="box-sizing:border-box">$file</span>);</blockquote>
</td>
</tr>
<tr style="box-sizing:border-box">
</tr>
</tbody>
</table>
</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div>I'll check with other imaging devs to see if we have a workaround while our senior devs are away -- I think there must be some solution... </div>
<div>
<div>Meanwhile, the MD5hash for imaging files is documented here (<a href="https://github.com/aces/Loris-MRI/blob/21.0-dev/docs/scripts_md/MRIProcessingUtility.md#computemd5hashfile-upload_id">per this script documentation</a>) : </div>
<div><br>
</div>
</div>
<div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
computeMd5Hash($file, $upload_id)<br>
Computes the MD5 hash of a file and makes sure it is unique.<br>
INPUTS:
<ul style="box-sizing:border-box;margin-bottom:16px;margin-top:0px;padding-left:2em;color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px">
<li style="box-sizing:border-box">$file : file to use to compute the MD5 hash</li></ul>
<ul style="box-sizing:border-box;margin-bottom:16px;margin-top:0px;padding-left:2em;color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px">
<li style="box-sizing:border-box;margin-top:0.25em">$upload_id: upload ID of the study</li></ul>
RETURNS: 1 if the file is unique, 0 otherwise</blockquote>
</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div>Best, </div>
<div>Christine </div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Aug 29, 2019 at 9:46 PM Morales Pinzon, Alfredo <<a href="mailto:AMORALESPINZON@bwh.harvard.edu">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 dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</div>
<span>Dear DevLoris Team,<br>
</span>
<div><br>
</div>
<div>I started the uploading process of processed files, segmentations and transformations, using the file "<a href="http://register_processed_data.pl" target="_blank">register_processed_data.pl</a>" but some files are not being uploaded. The error reported
in "data/logs/registerProcessed" show the following log for one of the files that could not be inserted:<br>
</div>
<div><br>
</div>
<div>-------------------------------------------------------------------------------<br>
</div>
<div>==> Successfully connected to database <br>
</div>
<div>Log file, 2019-08-29_19:08:17<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>==>Mapped DICOM parameters<br>
</div>
<div> -> using user-defined filterParameters for /xxx/w024/gvf_ISPC-stx152lsq6.mnc.gz<br>
</div>
<div><br>
</div>
<div>==> Verifying acquisition center<br>
</div>
<div> - Center Name : UNKN<br>
</div>
<div> - CenterID : 0<br>
</div>
<div> -> Set ScannerID to 0.<br>
</div>
<div><br>
</div>
<div>==> Data found for candidate : 123456 - Visit: w024<br>
</div>
<div> -> Set SessionID to 28269.<br>
</div>
<div> -> Set SourceFileID to 49598.<br>
</div>
<div> -> Set AcquisitionProtocolID to 1013.<br>
</div>
<div> -> Set CoordinateSpace to stx152lsq6.<br>
</div>
<div> -> Set SourcePipeline to ConsensusGd.<br>
</div>
<div> -> Set PipelineDate to 2019-08-29.<br>
</div>
<div> -> Set OutputType to gvf.<br>
</div>
<div> -> Set md5hash to <span style="color:rgb(200,38,19)"><b>b877648ed0ef9a7458ad4931f4dbfd11</b></span>.<br>
</div>
<div><br>
</div>
<div>==> NeuroDB::File=HASH(0x136baa8) is not a unique file and will not be added to database.<br>
</div>
<div>-------------------------------------------------------------------------------<br>
</div>
<div><br>
</div>
<div>I checked the md5hash for a previous uploaded file, which is different from the previous, but the same "md5hash" was calculated. See the following log:<br>
</div>
<div><br>
</div>
<div>-------------------------------------------------------------------------------<br>
</div>
<div><br>
</div>
<div>==> Successfully connected to database <br>
</div>
<div>Log file, 2019-08-19_10:11:53<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>==>Mapped DICOM parameters<br>
</div>
<div> -> using user-defined filterParameters for <br>
</div>
<div><br>
</div>
<div>==> Verifying acquisition center<br>
</div>
<div> - Center Name : UNKN<br>
</div>
<div> - CenterID : 0<br>
</div>
<div> -> Set ScannerID to 0.<br>
</div>
<div><br>
</div>
<div>==> Data found for candidate : 123456 - Visit: baseline<br>
</div>
<div> -> Set SessionID to 28268.<br>
</div>
<div> -> Set SourceFileID to 49593.<br>
</div>
<div> -> Set AcquisitionProtocolID to 1013.<br>
</div>
<div> -> Set CoordinateSpace to stx152lsq6.<br>
</div>
<div> -> Set SourcePipeline to T2Vol.<br>
</div>
<div> -> Set PipelineDate to 2019-08-19.<br>
</div>
<div> -> Set OutputType to gvf.<br>
</div>
<div> -> Set md5hash to <span style="color:rgb(200,38,19)"><b>b877648ed0ef9a7458ad4931f4dbfd11</b></span>.<br>
</div>
<div>File /xxx/baseline/gvf_ISPC-stx152lsq6.mnc.gz <br>
</div>
<div> moved to:<br>
</div>
<div> /yyy/data/assembly/123456/baseline/mri/processed/T2Vol/IPMSA_123456_baseline_t1c_001_gvf_001.mnc.gz<br>
</div>
<div><br>
</div>
<div>==> FAILED TO INSERT INTERMEDIARY FILES FOR 112945!<br>
</div>
<div><br>
</div>
<div>Making JIV<br>
</div>
<div><br>
</div>
<div> ==> Registered /data_/ipmsa/loris_data/IPMSA/data/assembly/307024/baseline/mri/processed/T2Vol/IPMSA_307024_baseline_t1c_001_gvf_001.mnc.gz in database, given FileID: 112945<br>
</div>
<div>-------------------------------------------------------------------------------<br>
</div>
<div><br>
</div>
<div>Here are the corresponding md5 for each file calculated using the command md5sum:<br>
</div>
<div>/xxx/w024/gvf_ISPC-stx152lsq6.mnc.gz 7306010346c4614d8e338595b386ca5c<br>
</div>
<div>/xxx/baseline/gvf_ISPC-stx152lsq6.mnc.gz 22107253f8b87c9918ac7f82fdc22c36<br>
</div>
<div><br>
</div>
<div>Could you please help me inserting those files which are different in size and md5 from previous uploaded files? The only similarity between the previous uploaded files and the ones that could not be uploaded is the filename.</div>
<div><br>
</div>
<div>Let me know if you need more information.<br>
</div>
<div><br>
</div>
<div>Regards,<br>
</div>
<div>Alfredo.<br>
</div>
<div><br>
</div>
<span></span>
<div id="gmail-m_-9176187950921327585Signature">
<div class="gmail-m_-9176187950921327585BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="gmail-m_-9176187950921327585PlainText"></div>
</span></font></div>
</div>
<p></p>
<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>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div><br>
<a href="mailto:christine.rogers@mcgill.ca" target="_blank">christine.rogers@mcgill.ca</a><br>
McGill Centre for Integrative Neuroscience | MCIN.ca</div>
<div>Montreal Neurological Institute</div>
<div>McGill University | Montreal | Canada</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>