Skip to content

Commit

Permalink
Requested feature
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/osirixplugins/code@205 bdd3870d-6ba2-4b59-8605-1de7af000970
  • Loading branch information
aglv committed Mar 12, 2012
1 parent 063f105 commit 213c621
Show file tree
Hide file tree
Showing 7 changed files with 420 additions and 0 deletions.
Binary file added CloseThisStudy/CloseThisStudy.pdf
Binary file not shown.
338 changes: 338 additions & 0 deletions CloseThisStudy/CloseThisStudy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,338 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
712D59F7150E0C9B00176990 /* CloseThisStudy.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 712D59F6150E0C9B00176990 /* CloseThisStudy.pdf */; };
8420023212E829A200E1E9CE /* OsiriXAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8420023112E829A200E1E9CE /* OsiriXAPI.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
8D5B49AE048680CD000E48DA /* CloseThisStudy_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCF630370AF2F00C91783 /* CloseThisStudy_Prefix.pch */; };
8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
ABA48A650680BB600089EB4F /* CloseThisStudyFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = ABA48A640680BB600089EB4F /* CloseThisStudyFilter.h */; };
ABA48A670680BB690089EB4F /* CloseThisStudyFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = ABA48A660680BB690089EB4F /* CloseThisStudyFilter.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
32DBCF630370AF2F00C91783 /* CloseThisStudy_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CloseThisStudy_Prefix.pch; sourceTree = "<group>"; };
712D59F6150E0C9B00176990 /* CloseThisStudy.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = CloseThisStudy.pdf; sourceTree = "<group>"; };
8420023112E829A200E1E9CE /* OsiriXAPI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OsiriXAPI.framework; path = "../../osirix-trunk/build/Development/OsiriXAPI.framework"; sourceTree = "<group>"; };
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
AB5D36050680E57E00F4007A /* CloseThisStudy.osirixplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CloseThisStudy.osirixplugin; sourceTree = BUILT_PRODUCTS_DIR; };
ABA48A640680BB600089EB4F /* CloseThisStudyFilter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CloseThisStudyFilter.h; sourceTree = "<group>"; };
ABA48A660680BB690089EB4F /* CloseThisStudyFilter.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CloseThisStudyFilter.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
8D5B49B3048680CD000E48DA /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */,
8420023212E829A200E1E9CE /* OsiriXAPI.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
089C166AFE841209C02AAC07 /* CloseThisStudy */ = {
isa = PBXGroup;
children = (
08FB77AFFE84173DC02AAC07 /* Classes */,
32C88E010371C26100C91783 /* Other Sources */,
089C167CFE841241C02AAC07 /* Resources */,
089C1671FE841209C02AAC07 /* Frameworks and Libraries */,
19C28FB8FE9D52D311CA2CBB /* Products */,
);
name = CloseThisStudy;
sourceTree = "<group>";
};
089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
8420023112E829A200E1E9CE /* OsiriXAPI.framework */,
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */,
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */,
);
name = "Frameworks and Libraries";
sourceTree = "<group>";
};
089C167CFE841241C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
712D59F6150E0C9B00176990 /* CloseThisStudy.pdf */,
8D5B49B7048680CD000E48DA /* Info.plist */,
);
name = Resources;
sourceTree = "<group>";
};
08FB77AFFE84173DC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
ABA48A640680BB600089EB4F /* CloseThisStudyFilter.h */,
ABA48A660680BB690089EB4F /* CloseThisStudyFilter.m */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
089C1672FE841209C02AAC07 /* Foundation.framework */,
089C167FFE841241C02AAC07 /* AppKit.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FB8FE9D52D311CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
AB5D36050680E57E00F4007A /* CloseThisStudy.osirixplugin */,
);
name = Products;
sourceTree = "<group>";
};
32C88E010371C26100C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
32DBCF630370AF2F00C91783 /* CloseThisStudy_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
8D5B49AD048680CD000E48DA /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
8D5B49AE048680CD000E48DA /* CloseThisStudy_Prefix.pch in Headers */,
ABA48A650680BB600089EB4F /* CloseThisStudyFilter.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
8D5B49AC048680CD000E48DA /* CloseThisStudy */ = {
isa = PBXNativeTarget;
buildConfigurationList = CE6A9A9008AC841300D0C1EE /* Build configuration list for PBXNativeTarget "CloseThisStudy" */;
buildPhases = (
8D5B49AD048680CD000E48DA /* Headers */,
8D5B49AF048680CD000E48DA /* Resources */,
8D5B49B1048680CD000E48DA /* Sources */,
8D5B49B3048680CD000E48DA /* Frameworks */,
8D5B49B5048680CD000E48DA /* Rez */,
);
buildRules = (
);
dependencies = (
);
name = CloseThisStudy;
productInstallPath = "$(HOME)/Library/Bundles";
productName = Invert;
productReference = AB5D36050680E57E00F4007A /* CloseThisStudy.osirixplugin */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0430;
};
buildConfigurationList = CE6A9A9408AC841300D0C1EE /* Build configuration list for PBXProject "CloseThisStudy" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 089C166AFE841209C02AAC07 /* CloseThisStudy */;
projectDirPath = "";
projectRoot = "";
targets = (
8D5B49AC048680CD000E48DA /* CloseThisStudy */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
8D5B49AF048680CD000E48DA /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
712D59F7150E0C9B00176990 /* CloseThisStudy.pdf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXRezBuildPhase section */
8D5B49B5048680CD000E48DA /* Rez */ = {
isa = PBXRezBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXRezBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
8D5B49B1048680CD000E48DA /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
ABA48A670680BB690089EB4F /* CloseThisStudyFilter.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
CE6A9A9108AC841300D0C1EE /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUGGING_SYMBOLS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"../../osirix-trunk/build/Development/",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_TRIGRAPHS = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloseThisStudy_Prefix.pch;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@executable_path/../Plug-ins";
LIBRARY_SEARCH_PATHS = "";
LIBRARY_STYLE = Bundle;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-undefined",
dynamic_lookup,
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = CloseThisStudy;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
WRAPPER_EXTENSION = osirixplugin;
ZERO_LINK = NO;
};
name = Development;
};
CE6A9A9208AC841300D0C1EE /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"../../osirix-trunk/build/Development/",
);
GCC_ENABLE_TRIGRAPHS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloseThisStudy_Prefix.pch;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@executable_path/../Plug-ins";
LIBRARY_SEARCH_PATHS = "";
LIBRARY_STYLE = Bundle;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-undefined",
dynamic_lookup,
);
OTHER_REZFLAGS = "";
PRODUCT_NAME = CloseThisStudy;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = (
"-Wmost",
"-Wno-four-char-constants",
"-Wno-unknown-pragmas",
);
WRAPPER_EXTENSION = osirixplugin;
ZERO_LINK = NO;
};
name = Deployment;
};
CE6A9A9508AC841300D0C1EE /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
i386,
x86_64,
);
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx10.6;
};
name = Development;
};
CE6A9A9608AC841300D0C1EE /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
x86_64,
i386,
);
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx10.6;
};
name = Deployment;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
CE6A9A9008AC841300D0C1EE /* Build configuration list for PBXNativeTarget "CloseThisStudy" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CE6A9A9108AC841300D0C1EE /* Development */,
CE6A9A9208AC841300D0C1EE /* Deployment */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Development;
};
CE6A9A9408AC841300D0C1EE /* Build configuration list for PBXProject "CloseThisStudy" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CE6A9A9508AC841300D0C1EE /* Development */,
CE6A9A9608AC841300D0C1EE /* Deployment */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Development;
};
/* End XCConfigurationList section */
};
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
}
17 changes: 17 additions & 0 deletions CloseThisStudy/CloseThisStudyFilter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// CloseThisStudyFilter.h
// CloseThisStudy
//
// Copyright (c) 2012 OsiriX. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <OsiriXAPI/PluginFilter.h>

@interface CloseThisStudyFilter : PluginFilter {

}

- (long) filterImage:(NSString*) menuName;

@end
25 changes: 25 additions & 0 deletions CloseThisStudy/CloseThisStudyFilter.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// CloseThisStudyFilter.m
// CloseThisStudy
//
// Copyright (c) 2012 OsiriX. All rights reserved.
//

#import "CloseThisStudyFilter.h"

@implementation CloseThisStudyFilter

- (void) initPlugin {
}

-(long)filterImage:(NSString*)menuName {
NSString* studyInstanceUID = [[[viewerController studyInstanceUID] retain] autorelease];

for (ViewerController* vc in [ViewerController getDisplayed2DViewers])
if ([[vc studyInstanceUID] isEqualToString:studyInstanceUID])
[vc close];

return 0;
}

@end
8 changes: 8 additions & 0 deletions CloseThisStudy/CloseThisStudy_Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Prefix header for all source files of the 'CloseThisStudy' target in the 'CloseThisStudy' project.
//

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
#endif
Loading

0 comments on commit 213c621

Please sign in to comment.