<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Christine,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your answer.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Here are the answers to your questions:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(50, 49, 48); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">Can you use distinct
filenames ?</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">We could but we already have all the images, thousands, with a pre-defined convention. One solution could be to make a copy with
a different name before uploading.</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important"><span style="color: rgb(50, 49, 48); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">Are
you are trying to load additional data for a participant session (i.e. same IDs and visit label) ? </span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">Yes, we are uploading the result of a couple of pipelines for each participant for each label. </span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Let me know if you can find a workaround, in the mean time I will check with Pisti if we can make a copy of the files with a different name before uploading.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Best,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alfredo.</div>
<div id="Signature">
<div class="BodyFragment"></div>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Christine Rogers, Ms. <christine.rogers@mcgill.ca><br>
<b>Sent:</b> Friday, August 30, 2019 11:17 AM<br>
<b>To:</b> Morales Pinzon, Alfredo <AMORALESPINZON@BWH.HARVARD.EDU><br>
<b>Cc:</b> loris-dev@bic.mni.mcgill.ca <loris-dev@bic.mni.mcgill.ca>; Cecile Madjar <cecile.madjar@mcin.ca>; Sridar Narayanan, Dr. <sridar.narayanan@mcgill.ca>; Rozie Arnaoutelis, Ms. <rozie.arnaoutelis@mcgill.ca>; Douglas Arnold, Dr. <douglas.arnold@mcgill.ca>;
Guttmann, Charles,M.D. <guttmann@bwh.harvard.edu><br>
<b>Subject:</b> Re: [Loris-dev] Error "not a unique file" inserting segmentation files in LORIS</font>
<div> </div>
</div>
<div>
<p><span style="padding:3px 10px; border-radius:5px; color:#ffffff; font-weight:bold; display:inline-block; background-color:#ff0000"> External Email - Use Caution </span></p>
<p></p>
<div dir="ltr">Hi Alfredo,
<div><br>
</div>
<div>
<blockquote class="x_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="x_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="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<span class="x_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="x_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="x_gmail-highlight x_gmail-tab-size x_gmail-js-file-line-container" style="box-sizing:border-box; border-collapse:collapse; border-spacing:0px; color:rgb(36,41,46); font-size:14px">
<tbody style="box-sizing:border-box">
<tr style="box-sizing:border-box">
</tr>
<tr style="box-sizing:border-box">
<td id="x_gmail-LC622" class="x_gmail-blob-code x_gmail-blob-code-inner x_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="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<span class="x_gmail-pl-k" style="box-sizing:border-box; color:rgb(215,58,73)">my</span>
<span class="x_gmail-pl-smi" style="box-sizing:border-box">$unique</span> = &NeuroDB::MRI::is_unique_hash(\<span class="x_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 class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
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-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-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="x_gmail_quote">
<div dir="ltr" class="x_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="x_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="x_gmail-m_-9176187950921327585Signature">
<div class="x_gmail-m_-9176187950921327585BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="x_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="x_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>
</div>
</body>
</html>