private void loadStudy(Study study) {
        // Do nothing if nothing selected.
        if(study == null)
            return;
        
        // Get previous display state.
        DisplayState state = study.getDisplayState();
        
        if(state == null) // No previous display state
            MedImage.getImageView().viewImages(connection, study, 0, null, null);
        else
            MedImage.getImageView().viewImages(connection, study,
                    state.getImageIndex(), state.getCurrState(), state.getCommands());
    }