Skip to content

Commit

Permalink
WADO-RS: compatibility with macOS 10.12
Browse files Browse the repository at this point in the history
  • Loading branch information
rossetantoine committed Jan 14, 2017
1 parent 723b9a6 commit 48834a9
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 1,443 deletions.
4 changes: 2 additions & 2 deletions AYDicomPrint/AYDicomPrintWindowController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ - (void) _createPrintjob: (id) object

NSMutableString *filmSize = [NSMutableString stringWithString: filmSizeTag[[[dict valueForKey: @"filmSizeTag"] intValue]]];
[filmSize replaceOccurrencesOfString: @" " withString: @"" options: 0 range: NSMakeRange(0, [filmSize length])];
[filmSize replaceOccurrencesOfString: @"." withString: @"_" options: nil range: NSMakeRange(0, [filmSize length])];
[filmSize replaceOccurrencesOfString: @"." withString: @"_" options: 0 range: NSMakeRange(0, [filmSize length])];

[filmbox addAttribute: [NSXMLNode attributeWithName: @"image_display_format" stringValue: [imageDisplayFormat uppercaseString]]];
[filmbox addAttribute: [NSXMLNode attributeWithName: @"film_orientation" stringValue: [filmOrientationTag[[[dict valueForKey: @"filmOrientationTag"] intValue]] uppercaseString]]];
Expand Down Expand Up @@ -703,4 +703,4 @@ - (void) drawerDidClose: (NSNotification *) notification
[m_ToggleDrawerButton setTitle: NSLocalizedString(@"Show Printers...", nil)];
}

@end
@end
2 changes: 1 addition & 1 deletion Binaries/dcmtk-source/config/cfunix.h
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ typedef unsigned short ushort;
//#define WITH_LIBXML

/* Define if we are compiling with OpenSSL support */
#define WITH_OPENSSL
//#define WITH_OPENSSL

/* Define if we are compiling for built-in private tag dictionary */
/* #undef WITH_PRIVATE_TAGS */
Expand Down
2 changes: 1 addition & 1 deletion DCM Framework/DCMTagForNameDictionary.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ +(id)sharedTagForNameDictionary

}

sharedTagForNameDictionary = [[NSDictionary dictionaryWithContentsOfFile:path] retain];
sharedTagForNameDictionary = [[DCMTagForNameDictionary dictionaryWithContentsOfFile:path] retain];
}
return sharedTagForNameDictionary;
}
Expand Down
34 changes: 17 additions & 17 deletions OsiriXClasses/DICOMFiles/AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -4099,23 +4099,23 @@ - (void) applicationWillFinishLaunching: (NSNotification *) aNotification
}
}

if( [AppController isUnsupportedOS])
{
NSAlert* alert = [[NSAlert new] autorelease];
[alert setMessageText: NSLocalizedString( @"Mac OS Version", nil)];

[alert setInformativeText: NSLocalizedString( @"This version of OsiriX has not been validated or certified for this version of MacOS. Bugs, errors and instabilities can occur. Upgrade to latest version of OsiriX to solve this problem.", nil)];

[alert addButtonWithTitle: NSLocalizedString( @"OK", nil)];
[alert addButtonWithTitle: NSLocalizedString( @"Upgrade", nil)];

NSInteger button = [alert runModal];

if( button == NSAlertSecondButtonReturn)
{
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.osirix-viewer.com"]];
}
}
// if( [AppController isUnsupportedOS])
// {
// NSAlert* alert = [[NSAlert new] autorelease];
// [alert setMessageText: NSLocalizedString( @"Mac OS Version", nil)];
//
// [alert setInformativeText: NSLocalizedString( @"This version of OsiriX has not been validated or certified for this version of MacOS. Bugs, errors and instabilities can occur. Upgrade to latest version of OsiriX to solve this problem.", nil)];
//
// [alert addButtonWithTitle: NSLocalizedString( @"OK", nil)];
// [alert addButtonWithTitle: NSLocalizedString( @"Upgrade", nil)];
//
// NSInteger button = [alert runModal];
//
// if( button == NSAlertSecondButtonReturn)
// {
// [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.osirix-viewer.com"]];
// }
// }

if( [AppController hasMacOSXMountainLion] == NO)
{
Expand Down
1 change: 0 additions & 1 deletion OsiriXClasses/DICOMFiles/Decompress.mm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#import <Foundation/Foundation.h>
#import "DefaultsOsiriX.h"
#import "AppController.h"
#import "QTKit/QTMovie.h"
#import "DCMPix.h"
#import <WebKit/WebKit.h>
#include <mingpp.h>
Expand Down
2 changes: 1 addition & 1 deletion OsiriXClasses/DICOMFiles/DicomDatabase.mm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ +(void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSD
}

static NSString* const SqlFileName = @"Database.sql";
NSString* const OsirixDataDirName = @"OsiriX Data";
NSString* const OsirixDataDirName = @"OsiriX OS Data";
NSString* const O2ScreenCapturesSeriesName = NSLocalizedString(@"OsiriX Screen Captures", nil);;

+(NSString*)baseDirPathForPath:(NSString*)path {
Expand Down
6 changes: 3 additions & 3 deletions OsiriXClasses/DICOMFiles/browserController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1842,10 +1842,10 @@ -(IBAction) createDatabaseFolder:(id) sender
{
NSString *location = [oPanel filename];

if( [[location lastPathComponent] isEqualToString:@"OsiriX Data"])
if( [[location lastPathComponent] isEqualToString:@"OsiriX OS Data"])
location = [location stringByDeletingLastPathComponent];

if( [[location lastPathComponent] isEqualToString:@"DATABASE.noindex"] && [[[location stringByDeletingLastPathComponent] lastPathComponent] isEqualToString:@"OsiriX Data"])
if( [[location lastPathComponent] isEqualToString:@"DATABASE.noindex"] && [[[location stringByDeletingLastPathComponent] lastPathComponent] isEqualToString:@"OsiriX OS Data"])
location = [[location stringByDeletingLastPathComponent] stringByDeletingLastPathComponent];

[self openDatabasePath: location];
Expand Down Expand Up @@ -1922,7 +1922,7 @@ - (NSString*)getDatabaseIndexFileFor: (NSString*)path { // __deprecated
if( isDirectory)
{
// Default SQL file
NSString *index = [[path stringByAppendingPathComponent:@"OsiriX Data"] stringByAppendingPathComponent:@"Database.sql"];
NSString *index = [[path stringByAppendingPathComponent:@"OsiriX OS Data"] stringByAppendingPathComponent:@"Database.sql"];

if( [[NSFileManager defaultManager] fileExistsAtPath: index])
{
Expand Down
2 changes: 1 addition & 1 deletion OsiriXClasses/DICOMNetwork/BonjourBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ - (void) buildLocalPathsList
{
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithDictionary: [dbArray objectAtIndex: i]];

if( [[dict valueForKey:@"Path"] isEqualToString: defaultPath] == NO && [[[dict valueForKey:@"Path"] stringByAppendingPathComponent:@"OsiriX Data"] isEqualToString: defaultPath] == NO)
if( [[dict valueForKey:@"Path"] isEqualToString: defaultPath] == NO && [[[dict valueForKey:@"Path"] stringByAppendingPathComponent:@"OsiriX OS Data"] isEqualToString: defaultPath] == NO)
{
[dict setValue:@"localPath" forKey:@"type"];
[services addObject: dict];
Expand Down
8 changes: 4 additions & 4 deletions OsiriXClasses/DICOMNetwork/DCMTKQueryNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ + (void) releaseNetworkVariables
{
T_ASC_Association *assoc = (T_ASC_Association*) [[dict objectForKey: @"assoc"] pointerValue];
T_ASC_Network *net = (T_ASC_Network*) [[dict objectForKey: @"net"] pointerValue];
DcmTLSTransportLayer *tLayer = (DcmTLSTransportLayer*) [[dict objectForKey: @"tLayer"] pointerValue];
// DcmTLSTransportLayer *tLayer = (DcmTLSTransportLayer*) [[dict objectForKey: @"tLayer"] pointerValue];
OFCondition cond;

// CLEANUP
Expand Down Expand Up @@ -2032,8 +2032,8 @@ - (BOOL)setupNetworkWithSyntax:(const char *)abstractSyntax dataset:(DcmDataset
[wait setCancel: YES];
[wait start];
}
DcmTLSTransportLayer *tLayer = NULL;

// DcmTLSTransportLayer *tLayer = NULL;
NSString *uniqueStringID = [NSString stringWithFormat:@"%d.%d.%d", getpid(), inc++, (int) random()];

// if (_secureConnection)
Expand Down Expand Up @@ -2535,7 +2535,7 @@ - (BOOL)setupNetworkWithSyntax:(const char *)abstractSyntax dataset:(DcmDataset

@synchronized( releaseNetworkVariablesDictionaries)
{
[releaseNetworkVariablesDictionaries addObject: [NSDictionary dictionaryWithObjectsAndKeys: [NSDate date], @"date", [NSValue valueWithPointer: assoc], @"assoc", [NSValue valueWithPointer: net], @"net", [NSValue valueWithPointer: tLayer], @"tLayer", nil]];
[releaseNetworkVariablesDictionaries addObject: [NSDictionary dictionaryWithObjectsAndKeys: [NSDate date], @"date", [NSValue valueWithPointer: assoc], @"assoc", [NSValue valueWithPointer: net], @"net", nil]];
}

// // CLEANUP
Expand Down
48 changes: 24 additions & 24 deletions OsiriXClasses/DICOMNetwork/DCMTKServiceClassUser.mm
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,30 @@ - (id) initWithCallingAET:(NSString *)myAET
_cipherSuites = nil;
_dhparam = NULL;

if (_secureConnection)
{
_doAuthenticate = [[extraParameters objectForKey:@"TLSAuthenticated"] boolValue];
_keyFileFormat = SSL_FILETYPE_PEM;
certVerification = (TLSCertificateVerificationType)[[extraParameters objectForKey:@"TLSCertificateVerification"] intValue];

NSArray *suites = [extraParameters objectForKey:@"TLSCipherSuites"];
NSMutableArray *selectedCipherSuites = [NSMutableArray array];

for (NSDictionary *suite in suites)
{
if ([[suite objectForKey:@"Supported"] boolValue])
[selectedCipherSuites addObject:[suite objectForKey:@"Cipher"]];
}

_cipherSuites = [[NSArray arrayWithArray:selectedCipherSuites] retain];

if([[extraParameters objectForKey:@"TLSUseDHParameterFileURL"] boolValue])
_dhparam = [[extraParameters objectForKey:@"TLSDHParameterFileURL"] cStringUsingEncoding:NSUTF8StringEncoding];

[DDKeychain generatePseudoRandomFileToPath:TLS_SEED_FILE];
_readSeedFile = [TLS_SEED_FILE cStringUsingEncoding:NSUTF8StringEncoding];
_writeSeedFile = TLS_WRITE_SEED_FILE;
}
// if (_secureConnection)
// {
// _doAuthenticate = [[extraParameters objectForKey:@"TLSAuthenticated"] boolValue];
// _keyFileFormat = SSL_FILETYPE_PEM;
// certVerification = (TLSCertificateVerificationType)[[extraParameters objectForKey:@"TLSCertificateVerification"] intValue];
//
// NSArray *suites = [extraParameters objectForKey:@"TLSCipherSuites"];
// NSMutableArray *selectedCipherSuites = [NSMutableArray array];
//
// for (NSDictionary *suite in suites)
// {
// if ([[suite objectForKey:@"Supported"] boolValue])
// [selectedCipherSuites addObject:[suite objectForKey:@"Cipher"]];
// }
//
// _cipherSuites = [[NSArray arrayWithArray:selectedCipherSuites] retain];
//
// if([[extraParameters objectForKey:@"TLSUseDHParameterFileURL"] boolValue])
// _dhparam = [[extraParameters objectForKey:@"TLSDHParameterFileURL"] cStringUsingEncoding:NSUTF8StringEncoding];
//
// [DDKeychain generatePseudoRandomFileToPath:TLS_SEED_FILE];
// _readSeedFile = [TLS_SEED_FILE cStringUsingEncoding:NSUTF8StringEncoding];
// _writeSeedFile = TLS_WRITE_SEED_FILE;
// }

if( numberOfDcmLongSCUStorageSOPClassUIDs > 120)
NSLog( @"******** numberOfDcmLongSCUStorageSOPClassUIDs > 120");
Expand Down
48 changes: 24 additions & 24 deletions OsiriXClasses/DICOMNetwork/DCMTKStoreSCU.mm
Original file line number Diff line number Diff line change
Expand Up @@ -977,29 +977,29 @@ - (id) initWithCallingAET:(NSString *)myAET
_cipherSuites = nil;
_dhparam = NULL;

if (_secureConnection)
{
_doAuthenticate = [[extraParameters objectForKey:@"TLSAuthenticated"] boolValue];
_keyFileFormat = SSL_FILETYPE_PEM;
certVerification = (TLSCertificateVerificationType)[[extraParameters objectForKey:@"TLSCertificateVerification"] intValue];

NSArray *suites = [extraParameters objectForKey:@"TLSCipherSuites"];
NSMutableArray *selectedCipherSuites = [NSMutableArray array];

for (NSDictionary *suite in suites)
{
if ([[suite objectForKey:@"Supported"] boolValue])
[selectedCipherSuites addObject:[suite objectForKey:@"Cipher"]];
}

_cipherSuites = [[NSArray arrayWithArray:selectedCipherSuites] retain];

if([[extraParameters objectForKey:@"TLSUseDHParameterFileURL"] boolValue])
_dhparam = [[extraParameters objectForKey:@"TLSDHParameterFileURL"] cStringUsingEncoding:NSUTF8StringEncoding];

_readSeedFile = [TLS_SEED_FILE cStringUsingEncoding:NSUTF8StringEncoding];
_writeSeedFile = TLS_WRITE_SEED_FILE;
}
// if (_secureConnection)
// {
// _doAuthenticate = [[extraParameters objectForKey:@"TLSAuthenticated"] boolValue];
// _keyFileFormat = SSL_FILETYPE_PEM;
// certVerification = (TLSCertificateVerificationType)[[extraParameters objectForKey:@"TLSCertificateVerification"] intValue];
//
// NSArray *suites = [extraParameters objectForKey:@"TLSCipherSuites"];
// NSMutableArray *selectedCipherSuites = [NSMutableArray array];
//
// for (NSDictionary *suite in suites)
// {
// if ([[suite objectForKey:@"Supported"] boolValue])
// [selectedCipherSuites addObject:[suite objectForKey:@"Cipher"]];
// }
//
// _cipherSuites = [[NSArray arrayWithArray:selectedCipherSuites] retain];
//
// if([[extraParameters objectForKey:@"TLSUseDHParameterFileURL"] boolValue])
// _dhparam = [[extraParameters objectForKey:@"TLSDHParameterFileURL"] cStringUsingEncoding:NSUTF8StringEncoding];
//
// _readSeedFile = [TLS_SEED_FILE cStringUsingEncoding:NSUTF8StringEncoding];
// _writeSeedFile = TLS_WRITE_SEED_FILE;
// }

_filesToSend = [[NSMutableArray arrayWithArray: filesToSend] retain];
[_filesToSend removeDuplicatedStrings];
Expand Down Expand Up @@ -1244,7 +1244,7 @@ - (void)run:(NSOperation*) operation
//opt_maxSendPDULength =
//dcmMaxOutgoingPDUSize.set((Uint32)opt_maxSendPDULength);

DcmTLSTransportLayer *tLayer = NULL;
//DcmTLSTransportLayer *tLayer = NULL;

#ifndef OSIRIX_LIGHT
// if( _secureConnection)
Expand Down
2 changes: 1 addition & 1 deletion OsiriXClasses/GUI/MyOutlineView.m
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ - (void) terminateDrag:(NSArray*) fileArray

if( [fileArray count] == 1 && [[NSFileManager defaultManager] fileExistsAtPath: [fileArray objectAtIndex: 0] isDirectory: &directory])
{
if( [[[fileArray objectAtIndex: 0] lastPathComponent] isEqualToString: @"OsiriX Data"]) // It's a database folder !
if( [[[fileArray objectAtIndex: 0] lastPathComponent] isEqualToString: @"OsiriX OS Data"]) // It's a database folder !
{
if( [[NSFileManager defaultManager] fileExistsAtPath: [[fileArray objectAtIndex: 0] stringByAppendingPathComponent: @"Database.sql"]])
{
Expand Down
Loading

1 comment on commit 48834a9

@jacquesfauquex
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what I see, there is nothing about WADO-RS or compatibility with 10.12 in these parches. They:

  • remove secure connections
  • enforce the name "OsiriX OS Data" for data folder
  • remove SDKROOT = macosx10.8 ... for compatibility :-)
  • enforces VALID_ARCHS = i386
  • do some more cleaning

What is the status of this repository? What is the purpose of this maintenance?

Please sign in to comment.