Skip to content

Commit

Permalink
MD-288
Browse files Browse the repository at this point in the history
  • Loading branch information
rossetantoine committed Apr 22, 2013
1 parent ba705df commit 4f56aae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DCMTKQueryNode.h
Expand Up @@ -79,7 +79,7 @@
- (DCMCalendarDate *)time;
- (NSString *)modality;
- (NSNumber *)numberImages;
- (NSMutableArray *)children;
- (NSArray *)children;
- (void) setChildren: (NSArray *) c;
- (void)purgeChildren;
- (void)addChild:(DcmDataset *)dataset;
Expand Down
9 changes: 4 additions & 5 deletions DCMTKQueryNode.mm
Expand Up @@ -518,7 +518,7 @@ - (NSString *)modality{
- (NSNumber *)numberImages{
return _numberImages;
}
- (NSMutableArray *)children
- (NSArray *)children
{
@synchronized( _children)
{
Expand Down Expand Up @@ -977,8 +977,6 @@ - (void) WADORetrieve: (DCMTKStudyQueryNode*) study // requestService: WFIND?
N2LogExceptionWithStackTrace(e);
}

NSMutableArray *urlToDownload = [NSMutableArray array];

if( [self isKindOfClass:[DCMTKStudyQueryNode class]])
{
// We are at STUDY level, and we want to go direclty to IMAGE level
Expand Down Expand Up @@ -1013,6 +1011,7 @@ - (void) WADORetrieve: (DCMTKStudyQueryNode*) study // requestService: WFIND?
[_children removeAllObjects];
}

NSMutableArray *urlToDownload = [NSMutableArray array];
@try
{
childrenArray = [childrenArray sortedArrayUsingDescriptors: [NSArray arrayWithObjects: [NSSortDescriptor sortDescriptorWithKey: @"seriesInstanceUID" ascending: YES], nil]];
Expand Down Expand Up @@ -1043,8 +1042,6 @@ - (void) WADORetrieve: (DCMTKStudyQueryNode*) study // requestService: WFIND?

self.countOfSuboperations += urlToDownload.count;
self.countOfSuccessfulSuboperations += downloader.countOfSuccesses;

[urlToDownload removeAllObjects];
}
}

Expand All @@ -1067,6 +1064,8 @@ - (void) WADORetrieve: (DCMTKStudyQueryNode*) study // requestService: WFIND?
childrenArray = [self children];
}

NSMutableArray *urlToDownload = [NSMutableArray array];

@try
{
for( DCMTKQueryNode *image in childrenArray)
Expand Down
2 changes: 1 addition & 1 deletion DCMTKStudyQueryNode.mm
Expand Up @@ -398,7 +398,7 @@ - (id)valueForUndefinedKey:(NSString *)key
return nil;
}

- (NSMutableArray*)children // instead of sorting after every addChild, we sort when the array is requested
- (NSArray*)children // instead of sorting after every addChild, we sort when the array is requested
{
@synchronized( _children)
{
Expand Down

0 comments on commit 4f56aae

Please sign in to comment.