cinemascience / cinema_components

A JavaScript library for building Cinema viewers
Other
2 stars 5 forks source link

Added VTI and PDB VTK-js viewers for Image Spread #8

Closed dtorban closed 6 years ago

dtorban commented 6 years ago

Unfortunately XCode formatted the ImageSpread.js differently, so it looks like the entire file changed. I added createModalVTI() and createModalPDB(). Eventually these should be moved to their own file handlers, but implemented like images to maintain consistency until we want to move it out. To use in a viewer, it is important to add the following line in the html document before adding components script:

<script type="text/javascript" src="https://unpkg.com/vtk.js"></script>
camtauxe commented 6 years ago

Looks good to me. This'll work fine for now, but in the future we may want to implement the "file handler" system we discussed earlier. I don't want the ImageSpread.js file to get too bloated as we add support for additional filetypes.