Images module
Images List
API URL
/api/patients/{patientId}/dicom/studies
GET response
{ dateRecorded:736124400000 source:"orthanc" studyDescription:"RT ANKLE" studyId:"55a9fcd2-e8197ca2-1af7a8e2-0e1ab147-841c65ba" }
Component structure
//component template let templateImageList = require('./image-list.html'); //controller init class ImageListController { constructor($scope, $window, $state, $stateParams, $ngRedux, imageActions, serviceRequests, usSpinnerService, serviceFormatted) { } //component init const ImageListComponent = { template: templateImageList, controller: ImageListController }; //inject services/modules to controller ImageListController.$inject = ['$scope', '$window', '$state', '$stateParams', '$ngRedux', 'imageActions', 'serviceRequests', 'usSpinnerService', 'serviceFormatted']; //es6 export for component export default ImageListComponent;
Images Detail
API URL
/api/patients/{patientId}/dicom/studies/{studyId}/series?source=orthanc
GET response
{ seriesIds:["fd6433fb-cac3aecf-e1b315ea-a534c0c8-dba38a8f"] source:"orthanc" studyId:"885eb7e5-d07fa57b-5a1c6637-3886ed16-d6f22cf5" }
Component structure
//component template let templateImageDetail= require('./image-detail.html'); import cornerstoneJS from '../../../../cornerstone/cornerstone'; //controller init class ImageDetailController { constructor($scope, $state, $stateParams, $ngRedux, serviceActions, serviceRequests, usSpinnerService) { } //component init const ImageDetailComponent = { template: templateImageDetail, controller: ImageDetailController }; //inject services/modules to controller ImageDetailController.$inject = ['$scope', '$state', '$stateParams', '$ngRedux', 'serviceActions', 'serviceRequests', 'usSpinnerService']; //es6 export for component export default ImageDetailComponent;
Dicom Actions
Component structure
//es6 import modules import {bindActionCreators} from 'redux'; import * as types from '../../../constants/ActionTypes'; //es6 export function export function allStudies(patientId) { return { types: [types.STUDIES, types.STUDIES_SUCCESS, types.STUDIES_ERROR], shouldCallAPI: (state) => !state.studies.response, config: { method: 'get', url: '/api/patients/' + patientId + '/dicom/' + 'studies' }, meta: { timestamp: Date.now() } }; }
Dicom Reducer
Component structure
//es6 import modules import * as types from '../../../constants/ActionTypes'; const INITIAL_STATE = { isFetching: false, error: false, data: null, dataGet: null, dataCreate: null, dataUpdate: null }; //es6 export function export default function series(state = INITIAL_STATE, action) { const {payload} = action; //redux action for Dicom requests var actions = { [types.SERIES_GET]: (state) => { return Object.assign({}, state, { isFetching: true, error: false }); }Cornerstone librry is by default excluded from the core build, and should be included from the external plugin repo: here