Permalink
Please sign in to comment.
Showing
with
275 additions
and 273 deletions.
- +1 −1 .classpath
- +3 −3 .gitignore
- +1 −1 .project
- +2 −2 LICENSE.txt
- +7 −7 Makefile
- +2 −2 TODO.txt
- +5 −5 build.xml
- +79 −0 openslide.i
- +33 −32 src/edu/cmu/cs/{wholeslide/Wholeslide.java → openslide/OpenSlide.java}
- +31 −0 src/edu/cmu/cs/openslide/OpenSlideDisposedException.java
- +10 −10 src/edu/cmu/cs/{wholeslide/WholeslideException.java → openslide/OpenSlideException.java}
- +26 −26 src/edu/cmu/cs/{wholeslide → openslide}/Test.java
- +15 −15 src/edu/cmu/cs/{wholeslide → openslide}/gui/Demo.java
- +60 −60 src/edu/cmu/cs/{wholeslide/gui/WholeslideView.java → openslide/gui/OpenSlideView.java}
- +0 −31 src/edu/cmu/cs/wholeslide/WholeslideDisposedException.java
- +0 −78 wholeslide.i
| @@ -1,7 +1,7 @@ | ||
| /bin | ||
| -/wholeslide_wrap.c | ||
| -/wholeslidejava.jar | ||
| +/openslide_wrap.c | ||
| +/openslidejava.jar | ||
| -/src/edu/cmu/cs/wholeslide/glue | ||
| +/src/edu/cmu/cs/openslide/glue | ||
| *.so |
| @@ -1,6 +1,6 @@ | ||
| -Fancy zooming/scrolling in WholeslideView | ||
| +Fancy zooming/scrolling in OpenSlideView | ||
| -Rotation in WholeslideView | ||
| +Rotation in OpenSlideView | ||
| Make swig generated Java code not public |
79
openslide.i
| @@ -0,0 +1,79 @@ | ||
| +/* -*- c -*- */ | ||
| +/* | ||
| + * OpenSlide, a library for reading whole slide image files | ||
| + * | ||
| + * Copyright (c) 2007-2008 Carnegie Mellon University | ||
| + * All rights reserved. | ||
| + * | ||
| + * OpenSlide is free software: you can redistribute it and/or modify | ||
| + * it under the terms of the GNU General Public License as published by | ||
| + * the Free Software Foundation, version 2. | ||
| + * | ||
| + * OpenSlide is distributed in the hope that it will be useful, | ||
| + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| + * GNU General Public License for more details. | ||
| + * | ||
| + * You should have received a copy of the GNU General Public License | ||
| + * along with OpenSlide. If not, see <http://www.gnu.org/licenses/>. | ||
| + * | ||
| + * Linking OpenSlide statically or dynamically with other modules is | ||
| + * making a combined work based on OpenSlide. Thus, the terms and | ||
| + * conditions of the GNU General Public License cover the whole | ||
| + * combination. | ||
| + */ | ||
| + | ||
| +%module OpenSlide | ||
| + | ||
| +%include "typemaps.i" | ||
| +%include "arrays_java.i" | ||
| +%include "various.i" | ||
| + | ||
| +#include <stdint.h> | ||
| + | ||
| +%javaconst(1); | ||
| + | ||
| +%{ | ||
| +#include "openslide.h" | ||
| +%} | ||
| + | ||
| +%pragma(java) jniclasscode=%{ | ||
| + static { | ||
| + try { | ||
| + System.loadLibrary("openslidejava"); | ||
| + } catch (UnsatisfiedLinkError e) { | ||
| + System.err.println("Native code library failed to load. \n" + e); | ||
| + } | ||
| + } | ||
| +%} | ||
| + | ||
| +%newobject openslide_open; | ||
| + | ||
| +%apply long long[] {int64_t *}; | ||
| +%apply int[] {uint32_t *}; | ||
| + | ||
| +typedef struct _openslide openslide_t; | ||
| + | ||
| +bool openslide_can_open(const char *filename); | ||
| + | ||
| +openslide_t *openslide_open(const char *filename); | ||
| + | ||
| +void openslide_get_layer_dimensions(openslide_t *osr, int32_t layer, | ||
| + int64_t *OUTPUT, int64_t *OUTPUT); | ||
| + | ||
| +int32_t openslide_get_layer_count(openslide_t *osr); | ||
| + | ||
| +void openslide_close(openslide_t *osr); | ||
| + | ||
| +const char *openslide_get_comment(openslide_t *osr); | ||
| + | ||
| +int32_t openslide_get_best_layer_for_downsample(openslide_t *osr, | ||
| + double downsample); | ||
| + | ||
| +double openslide_get_layer_downsample(openslide_t *osr, int32_t layer); | ||
| + | ||
| +void openslide_read_region(openslide_t *osr, | ||
| + uint32_t *dest, | ||
| + int64_t x, int64_t y, | ||
| + int32_t layer, | ||
| + int64_t w, int64_t h); |
| @@ -0,0 +1,31 @@ | ||
| +/* | ||
| + * OpenSlide, a library for reading whole slide image files | ||
| + * | ||
| + * Copyright (c) 2007-2008 Carnegie Mellon University | ||
| + * All rights reserved. | ||
| + * | ||
| + * OpenSlide is free software: you can redistribute it and/or modify | ||
| + * it under the terms of the GNU General Public License as published by | ||
| + * the Free Software Foundation, version 2. | ||
| + * | ||
| + * OpenSlide is distributed in the hope that it will be useful, | ||
| + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| + * GNU General Public License for more details. | ||
| + * | ||
| + * You should have received a copy of the GNU General Public License | ||
| + * along with OpenSlide. If not, see <http://www.gnu.org/licenses/>. | ||
| + * | ||
| + * Linking OpenSlide statically or dynamically with other modules is | ||
| + * making a combined work based on OpenSlide. Thus, the terms and | ||
| + * conditions of the GNU General Public License cover the whole | ||
| + * combination. | ||
| + */ | ||
| + | ||
| +package edu.cmu.cs.openslide; | ||
| + | ||
| +public class OpenSlideDisposedException extends OpenSlideException { | ||
| + public OpenSlideDisposedException() { | ||
| + super("OpenSlide object has been disposed"); | ||
| + } | ||
| +} |
Oops, something went wrong.
0 comments on commit
9851c2b