Giter Site home page Giter Site logo

dicom_viewer's Introduction

DICOM_viewer

A Unity hololens viewer for DICOM images

Setup

  1. Create a zip file containing your DICOM media directories
  2. Deploy the application to the device once
  3. Connect the device via usb, and navigate to http://localhost:10080/FileExplorer.htm - USB will give better/more reliable data transfer
  4. Navigate to LocalAppData\DICOM_viewer\LocalState
  5. Click the Choose File button, and select your zip file. Do not click Upload - at the time of writing, there is a bug in the file explorer (see https://stackoverflow.com/questions/46409655/transfer-file-to-hololens-via-post-httprequest-error-429/47086736#47086736) - instead, enter this code in the javascript console (F12) -
(function(jQuery) {
var pathLinkData = jQuery(".pathLink:last-child").data(),
    path = pathLinkData.path,
    packagename = pathLinkData.packagename,
    knownfolderid = pathLinkData.knownfolderid,
    url = '/api/filesystem/apps/file?knownfolderid=' + knownfolderid + '&packagefullname=' + packagename + '&path=%5C%5C' + path,
    file_data = jQuery('#fileToUpload')[0].files[0],
    form_data = new FormData();

  form_data.append('file', file_data, file_data.name);

  jQuery.ajax({
    url: url,
    dataType: 'text',
    cache: false,
    contentType: false,
    processData: false,
    data: form_data,
    type: 'POST',
    error: function(xhr, textStatus, error) { console.error(error) },

  xhr: function() {
    var xhr = new window.XMLHttpRequest();

    xhr.upload.addEventListener("progress", function(evt) {
      if (evt.lengthComputable) {
        var percentComplete = evt.loaded / evt.total;
        percentComplete = parseInt(percentComplete * 100);
        console.log(percentComplete + "% done");
      }
    }, false);

    return xhr;
  },
    success: function(res){
      alert('uploaded');
      console.log(res);
    }
  });
})(jQuery);
  • this is mostly based on doublerebel's stack overflow snippet, I just added a progress indicator
  1. Also upload a pin.txt containing your desired PIN via the same method
  2. Run the application and it will unzip your zip file

Troubleshooting

If you have issues building to the device (dll version conflicts) - in the built VS project, open Tools->NuGet Package Manager->Manage NuGet Packages For Solution and update Microsoft.NETCore.UniversalWindowsPlatform

dicom_viewer's People

Contributors

gzhuj avatar neon-ninja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dicom_viewer's Issues

app crashes due to memory limit if you open too many volumes

DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 67108864.
DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 67108864.
DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 67108864.
DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 67108864.
DynamicHeapAllocator out of memory - Could not get memory for large allocation 67108864!
Could not allocate memory: System out of memory!
Trying to allocate: 67108864B with 16 alignment. MemoryLabel: DynamicArray
Allocation happend at: Line:559 in C:\buildslave\unity\build\Runtime/Utilities/dynamic_array.h
Memory overview

[ ALLOC_DEFAULT ] used: 26685748B | peak: 0B | reserved: 38797312B
[ ALLOC_TEMP_JOB ] used: 0B | peak: 0B | reserved: 2097152B
[ ALLOC_TEMP_BACKGROUND_JOB ] used: 0B | peak: 0B | reserved: 1048576B
[ ALLOC_GFX ] used: 204244956B | peak: 0B | reserved: 206569580B
[ ALLOC_CACHEOBJECTS ] used: 2144368B | peak: 0B | reserved: 10485760B
[ ALLOC_TYPETREE ] used: 0B | peak: 0B | reserved: 0B
[ ALLOC_PROFILER ] used: 2026880B | peak: 0B | reserved: 8388608B
[ ALLOC_TEMP_THREAD ] used: 32768B | peak: 0B | reserved: 2883584B
Could not allocate memory: System out of memory!
Trying to allocate: 67108864B with 16 alignment. MemoryLabel: DynamicArray
Allocation happend at: Line:559 in C:\buildslave\unity\build\Runtime/Utilities/dynamic_array.h
Memory overview

[ ALLOC_DEFAULT ] used: 26685748B | peak: 0B | reserved: 38797312B
[ ALLOC_TEMP_JOB ] used: 0B | peak: 0B | reserved: 2097152B
[ ALLOC_TEMP_BACKGROUND_JOB ] used: 0B | peak: 0B | reserved: 1048576B
[ ALLOC_GFX ] used: 204244956B | peak: 0B | reserved: 206569580B
[ ALLOC_CACHEOBJECTS ] used: 2144368B | peak: 0B | reserved: 10485760B
[ ALLOC_TYPETREE ] used: 0B | peak: 0B | reserved: 0B
[ ALLOC_PROFILER ] used: 2026880B | peak: 0B | reserved: 8388608B
[ ALLOC_TEMP_THREAD ] used: 32768B | peak: 0B | reserved: 2883584B

(Filename: C:\buildslave\unity\build\Runtime/Allocator/MemoryManager.cpp Line: 1090)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.