Loading a serie

138 views
Skip to first unread message

ohjua...@gmail.com

unread,
Jul 5, 2016, 11:41:38 AM7/5/16
to cornerstone platform
Hi all,

I am trying to adapt the example of cornerstoneDemo.

The difference is I do not have thumbnails division.

I guess I load all the images in a serie. But I only can see the first image.

I do not understand the complete code of loadStudy. I would appreciate your advice....

Problems:
1. I the debug I see that cornerstone.playClip is not defined.
2. When I load again the example the image is not displayed. I guess there is not refresh. When I try to change layout the image is not showing any more.
3. In my example I only load one serie each time. No multiple series.
4. This is the code I changed:

    useItemStack(0, 0);

        function useItemStack(item, stack) {

            var imageId = imageViewer.stacks[stack].imageIds[0], element = imageViewer.getElement(item);

            if ($(element).data('waiting')) {

                imageViewer.viewports[item].find('.overlay-text').remove();

                $(element).data('waiting', false);

            }

            $(element).data('useStack', stack);

            /* //Octavio (I dod not have thumbnails)

            displayThumbnail(seriesList, $(seriesList).find('.list-group-item')[stack], element, imageViewer.stacks[stack], function(el, stack){

                if (!$(el).data('setup')) {

                    setupViewport(el, stack, this);

                    setupViewportOverlays(el, data);

                    $(el).data('setup', true);

                }

            }); */ //Octavio

            $(element).data('useStack', stack);

          (I uncommented this. My only way to see the image)

            cornerstone.loadAndCacheImage(imageId).then(function(image){

                setupViewport(element, imageViewer.stacks[stack], image);

                setupViewportOverlays(element, data);

                element.data('setup', true);

            });

        }



Thanks,

Octavio


ohjua...@gmail.com

unread,
Jul 5, 2016, 11:55:10 AM7/5/16
to cornerstone platform
Using this code I only can display png files but I am not able to display dcm files...

Chris Hafey

unread,
Jul 5, 2016, 6:12:02 PM7/5/16
to cornerstone platform
Check your imageId's, the app dynamically builds them from the JSON file and that many people miss that
Reply all
Reply to author
Forward
0 new messages