@@ -79,7 +79,13 @@ export default function getImageData(imageIds, displaySetInstanceUid) {
79
79
} ) ;
80
80
} ;
81
81
82
- const _publishAllPixelDataInseted = ( ) => {
82
+ const _publishPixelDataInsertedError = error => {
83
+ imageDataObject . subscriptions . onPixelDataInsertedError . forEach ( callback => {
84
+ callback ( error ) ;
85
+ } ) ;
86
+ } ;
87
+
88
+ const _publishAllPixelDataInserted = ( ) => {
83
89
imageDataObject . subscriptions . onAllPixelDataInserted . forEach ( callback => {
84
90
callback ( ) ;
85
91
} ) ;
@@ -90,6 +96,7 @@ export default function getImageData(imageIds, displaySetInstanceUid) {
90
96
// Remove all subscriptions on completion.
91
97
imageDataObject . subscriptions = {
92
98
onPixelDataInserted : [ ] ,
99
+ onPixelDataInsertedError : [ ] ,
93
100
onAllPixelDataInserted : [ ] ,
94
101
} ;
95
102
} ;
@@ -108,16 +115,21 @@ export default function getImageData(imageIds, displaySetInstanceUid) {
108
115
loaded : false ,
109
116
subscriptions : {
110
117
onPixelDataInserted : [ ] ,
118
+ onPixelDataInsertedError : [ ] ,
111
119
onAllPixelDataInserted : [ ] ,
112
120
} ,
113
121
onPixelDataInserted : callback => {
114
122
imageDataObject . subscriptions . onPixelDataInserted . push ( callback ) ;
115
123
} ,
124
+ onPixelDataInsertedError : callback => {
125
+ imageDataObject . subscriptions . onPixelDataInsertedError . push ( callback ) ;
126
+ } ,
116
127
onAllPixelDataInserted : callback => {
117
128
imageDataObject . subscriptions . onAllPixelDataInserted . push ( callback ) ;
118
129
} ,
119
130
_publishPixelDataInserted,
120
- _publishAllPixelDataInseted,
131
+ _publishAllPixelDataInserted,
132
+ _publishPixelDataInsertedError,
121
133
} ;
122
134
123
135
imageDataCache . set ( displaySetInstanceUid , imageDataObject ) ;
0 commit comments