Skip to content

Conversation

@natacha-beck
Copy link
Contributor

Add Dicom loader based on other BrainBrowser loader, and Papaya, and use Daikon lib

@MontrealSergiy
Copy link

MontrealSergiy commented Oct 27, 2025

works with examples, not sure how to load 3rd party files, eg. clicking view own files
https://github.com/robyoung/dicom-test-files
(nothing happens when I try to open those from local drive)

UPDATE Actually, nifti does not open too, that bugs looks unrelated to DICOM

@MontrealSergiy MontrealSergiy self-requested a review October 27, 2025 21:20
Copy link

@MontrealSergiy MontrealSergiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dicom is rendered

* BrainBrowser: Web-based Neurological Visualization Tools
* (https://brainbrowser.cbrain.mcgill.ca)
*
* Copyright (C) 2011-2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2011-2025?

* - https://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_10.27.1
*/

(function() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what the purpose of bracket?

Copy link
Member

@prioux prioux Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MontrealSergiy If you mean the initial open parenthesis, this is a common way in javascript to execute code without creating any variable or references outside of it. If you look at the very bottom of the file you will see this:

)();

Let me give you an example with Ruby lambdas.

  1. Let's define a function and run it:
x = lambda { puts "Hello" }
x.()
  1. Now the problem with the code above is that we have set a variable x. Maybe we don't want to pollute the current runtime binding with a variable like that. So given that an assigment also returns the value, we can just run it right there:
(x = lambda { puts "Hello" }).()
  1. and since the variable is not needed:
(lambda { puts "Hello" }).()

Javascript programmer do this because (at least in the traditional javascript) there are no namespaces in the language (no classes or modules) except for the namespace provided within a function. So to isolate all internal function names and variables and constants, they create an anonymous function and run it once.

Most javascript modules that want to be completely isolated are written as

(function() {
  code;
  function();
  code;
})();

@prioux
Copy link
Member

prioux commented Oct 27, 2025

This pull request should not include megabytes of DICOM files. In fact, in general a github repo is for CODE only. Datafiles should be fetched from external sources.

Copy link
Member

@prioux prioux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all data files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants