<commit_before># viewerjs

This is a reusable JavaScript module that exposes a <tt>viewerjs.Viewer</tt> class that provides methods
for easily embedding a neuroimage visualization object (VObj) within an HTML page. The <tt>viewerjs.Viewer</tt>
constructor only requires as an input the DOM identifier of the HTML element on which the resultant
VObj's HTML interface is inserted. The following code shows the simplicity of the method calls:

````
var view = new viewerjs.Viewer(divId);
view.init(imgFileArr);
view.addThumbnailBar();
view.addToolBar();
````

The VObj can asynchronously load more than one neuroimage volume specified by the <tt>imgFileArr</tt> variable
passed to the <tt>init</tt> method. This is an array of custom file objects where each object entry has the
following properties:
* url: String representing the file’s url/local path (required)
* file: HTML5 File object (optional but necessary when the files are gotten through a local file-picker
  or drop-zone)
* cloudId: String representing the file cloud identifier (optional but necessary when the files are gotten
  from a cloud storage service such as Google Drive)

Thus the VObj can load image data from diverse sources such as a hooked back-end using the provided <tt>url</tt>,
a local filesystem using the <tt>file</tt> property or the Google Drive storage service using the <tt>cloudId</tt>
property.

The <tt>viewerjs.Viewer</tt> constructor can also accept a [gcjs.GDriveCollab](https://github.com/FNNDSC/gcjs)  
object as an optional second parameter to enable realtime collaboration among remote visualizations. The
resultant VObj delegates the synchronization of the data describing the visualization state on that object.

Please take a look at the wiki to learn how to interact with the VObj through peripheral device controls.<commit_msg>Added link to the wiki<commit_after># viewerjs

This is a reusable JavaScript module that exposes a <tt>viewerjs.Viewer</tt> class that provides methods
for easily embedding a neuroimage visualization object (VObj) within an HTML page. The <tt>viewerjs.Viewer</tt>
constructor only requires as an input the DOM identifier of the HTML element on which the resultant
VObj's HTML interface is inserted. The following code shows the simplicity of the method calls:

````
var view = new viewerjs.Viewer(divId);
view.init(imgFileArr);
view.addThumbnailBar();
view.addToolBar();
````

The VObj can asynchronously load more than one neuroimage volume specified by the <tt>imgFileArr</tt> variable
passed to the <tt>init</tt> method. This is an array of custom file objects where each object entry has the
following properties:
* url: String representing the file’s url/local path (required)
* file: HTML5 File object (optional but necessary when the files are gotten through a local file-picker
  or drop-zone)
* cloudId: String representing the file cloud identifier (optional but necessary when the files are gotten
  from a cloud storage service such as Google Drive)

Thus the VObj can load image data from diverse sources such as a hooked back-end using the provided <tt>url</tt>,
a local filesystem using the <tt>file</tt> property or the Google Drive storage service using the <tt>cloudId</tt>
property.

The <tt>viewerjs.Viewer</tt> constructor can also accept a [gcjs.GDriveCollab](https://github.com/FNNDSC/gcjs)  
object as an optional second parameter to enable realtime collaboration among remote visualizations. The
resultant VObj delegates the synchronization of the data describing the visualization state on that object.

Please take a look at the [wiki](https://github.com/FNNDSC/viewerjs/wiki) to learn how to interact with the VObj
through peripheral device controls.
{'fraction_non_alphanumeric': 0.06395035078251485, 'fraction_numerical': 0.0005396654074473826, 'mean_word_length': 5.14759535655058, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7090210', 'n_tokens_mistral': 975, 'n_tokens_neox': 934, 'n_words': 497}