.
This commit is contained in:
@@ -276,7 +276,7 @@
|
||||
for (let elem of current_files) {
|
||||
current_files_tuple.add(
|
||||
`${elem.size}, ${elem.name}, ${elem.lastModified}`
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
console.log(current_files_tuple)
|
||||
@@ -285,8 +285,8 @@
|
||||
f = await items[i].handle.getFile()
|
||||
console.log("f", f)
|
||||
if (!current_files_tuple.has(
|
||||
`${f.size}, ${f.name}, ${f.lastModified}`
|
||||
)) {
|
||||
`${f.size}, ${f.name}, ${f.lastModified}`
|
||||
)) {
|
||||
files_to_add.add(f);
|
||||
}
|
||||
}
|
||||
@@ -306,12 +306,12 @@
|
||||
.after(
|
||||
$(
|
||||
" <span>[clear]</span>").click((evt) => {
|
||||
$(evt.target).remove();
|
||||
$("#directory-picker-display").text("");
|
||||
monitor_directory_handler = false;
|
||||
clearInterval(monitor_interval_id);
|
||||
//const files = await listAllFilesAndDirs(directoryHandle);
|
||||
}));
|
||||
$(evt.target).remove();
|
||||
$("#directory-picker-display").text("");
|
||||
monitor_directory_handler = false;
|
||||
clearInterval(monitor_interval_id);
|
||||
//const files = await listAllFilesAndDirs(directoryHandle);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
$(`img[data-input-id='${input.id}'`).removeClass("image-ident-loading");
|
||||
console.log(l);
|
||||
if (l.includes("accesion") || l.includes("number") || l.search(
|
||||
/(ref|rk9|rh8|ra9|rbz)\d+/g) > -1) {
|
||||
/(ref|rk9|rh8|ra9|rbz)\d+/g) > -1) {
|
||||
console.log("SHIT", input);
|
||||
$(input).addClass("image-ident-warning");
|
||||
$(`img[data-input-id='${input.id}'`).addClass("image-ident-warning");
|
||||
@@ -467,26 +467,32 @@
|
||||
const readFile = (file, el) => {
|
||||
reader(file).then(reader => {
|
||||
console.log("12345", reader)
|
||||
var image = new Image();
|
||||
image.height = 100;
|
||||
image.title = file.name;
|
||||
image.src = reader.result;
|
||||
image.className = "temp-thumb";
|
||||
$(el).parent().parent().find(".temp-thumb").remove();
|
||||
$(el).parent().parent().prepend(image);
|
||||
//images.push(reader.result);
|
||||
|
||||
if (reader.result.startsWith("data:application/octet-stream;base64")) {
|
||||
const element = $("<div class='temp-thumb'></div>").get(0)
|
||||
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
||||
file
|
||||
);
|
||||
cornerstone.enable(element);
|
||||
cornerstone.loadAndCacheImage(imageId).then(function (image) {
|
||||
cornerstone.displayImage(element, image);
|
||||
cornerstone.resize(element)
|
||||
|
||||
});
|
||||
$(el).parent().parent().prepend(element);
|
||||
|
||||
} else {
|
||||
var image = new Image();
|
||||
image.height = 100;
|
||||
image.title = file.name;
|
||||
image.src = reader.result;
|
||||
image.className = "temp-thumb";
|
||||
$(el).parent().parent().find(".temp-thumb").remove();
|
||||
$(el).parent().parent().prepend(image);
|
||||
//images.push(reader.result);
|
||||
}
|
||||
|
||||
|
||||
const element = $("<div class='thumb'></div>").get(0)
|
||||
const imageId = cornerstoneWADOImageLoader.wadouri.fileManager.add(
|
||||
file
|
||||
);
|
||||
cornerstone.enable(element);
|
||||
cornerstone.loadAndCacheImage(imageId).then(function(image) {
|
||||
cornerstone.displayImage(element, image);
|
||||
|
||||
});
|
||||
$(el).parent().parent().prepend(element);
|
||||
|
||||
|
||||
active_file_inputs.delete(el)
|
||||
@@ -613,11 +619,11 @@
|
||||
<h2>Submit Rapid</h2>
|
||||
<a href="{% url 'rapids:rapid_create_defaults' %}">Edit defaults</a>
|
||||
<p>
|
||||
<h3>Instructions</h3>
|
||||
Abnormality, Region and Laterality are used to categorise within the system (they are not used for marking). String
|
||||
answers that match those added below will be used for automatic marking. Multiple images can be added to a question.
|
||||
If
|
||||
the feedback image box is checked they will not be displayed when taking the question.
|
||||
<h3>Instructions</h3>
|
||||
Abnormality, Region and Laterality are used to categorise within the system (they are not used for marking). String
|
||||
answers that match those added below will be used for automatic marking. Multiple images can be added to a question.
|
||||
If
|
||||
the feedback image box is checked they will not be displayed when taking the question.
|
||||
</p>
|
||||
<div>
|
||||
To monitor a directory select it here.<br />
|
||||
|
||||
Reference in New Issue
Block a user