diff --git a/CHANGES b/CHANGES index d5e3dfd1..aaced315 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ What's New for OpenJPEG + : added April 14, 2011 ++ [antonin] initial commit of OpenJPIP 1.0, a JPIP client-server architecture based on OpenJPEG (see README file in jpip directory for more details) * [antonin] fixed applications/codec/CMakeLists.txt that prevented JPWL executables to be built with JPWL functionalities. ! [antonin] changed make all behaviour : DOC target removed from ALL. diff --git a/CMakeLists.txt b/CMakeLists.txt index c4297e70..bd73a34d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,7 +210,6 @@ ADD_SUBDIRECTORY(libopenjpeg) # Build Applications OPTION(BUILD_CODEC "Build the CODEC executables" ON) OPTION(BUILD_MJ2 "Build the MJ2 executables." OFF) -OPTION(BUILD_INDEXER_JPIP "Build the INDEXER_JPIP executables" OFF) ADD_SUBDIRECTORY(applications) #----------------------------------------------------------------------------- diff --git a/INSTALL b/INSTALL index a3d97475..61cf4cfa 100644 --- a/INSTALL +++ b/INSTALL @@ -67,7 +67,6 @@ Main available cmake flags: * To build the CODEC executables: '-DBUILD_CODEC:bool=on' (default: 'ON') * To build the MJ2 executables: '-DBUILD_MJ2:bool=on' (default: 'OFF') * To build the JPWL executables and JPWL library: '-DBUILD_JPWL:bool=on' (default: 'OFF') -* [WIN32 ONLY] To build the INDEXER_JPIP executable: '-DBUILD_INDEXER_JPIP:bool=on' (default: 'OFF') * To enable testing (and automatic result upload to http://my.cdash.org/index.php?project=OPENJPEG): cmake . -DBUILD_TESTING:BOOL=ON -DJPEG2000_CONFORMANCE_DATA_ROOT:PATH=/path/to/your/JPEG2000/test/files make diff --git a/README b/README index 2ee2b541..895b644d 100644 --- a/README +++ b/README @@ -11,7 +11,7 @@ Details on folders hierarchy: * codec: a basic codec * mj2: motion jpeg 2000 executables * JavaOpenJPEG: java jni to use openjpeg in a java program - * indexer_JPIP: obsolete. Will be replaced by a complete JPIP implementation soon. + * jpip: complete client-server architecture for remote browsing of jpeg 2000 images. See corresponding README for more details. * OPJViewer: gui for displaying j2k files (based on wxWidget) * thirdparty: thirdparty libraries used by some applications. These libraries will be build only if there are not found on the system. Note that libopenjpeg itself does not have any dependency. * doc: doxygen documentation setup file and man pages diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt index f4f16e4b..43081e8f 100644 --- a/applications/CMakeLists.txt +++ b/applications/CMakeLists.txt @@ -127,8 +127,4 @@ ENDIF(BUILD_CODEC) IF(BUILD_MJ2) ADD_SUBDIRECTORY(mj2) ENDIF(BUILD_MJ2) -# -IF(BUILD_INDEXER_JPIP) - ADD_SUBDIRECTORY(indexer_JPIP) -ENDIF(BUILD_INDEXER_JPIP) # \ No newline at end of file diff --git a/applications/indexer_JPIP/CMakeLists.txt b/applications/indexer_JPIP/CMakeLists.txt deleted file mode 100644 index c8e378d1..00000000 --- a/applications/indexer_JPIP/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# index_create - -ADD_EXECUTABLE(index_create -bio.c cio.c int.c pi.c t2.c tgt.c tcd.c index_create.c jpip.c jp2.c -) -INSTALL(TARGETS index_create - EXPORT OpenJPEGTargets - DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications -) diff --git a/applications/jpip/Makefile b/applications/jpip/Makefile new file mode 100644 index 00000000..29b3ce76 --- /dev/null +++ b/applications/jpip/Makefile @@ -0,0 +1,19 @@ +default: t_libopenjpip t_opj_server t_opj_dec_server t_tools + +t_libopenjpip: + make -C libopenjpip + +t_opj_server: + make -C opj_server + +t_opj_dec_server: + make -C opj_client/opj_dec_server + +t_tools: + make -C tools + +clean: + make clean -C libopenjpip + make clean -C opj_server + make clean -C opj_client/opj_dec_server + make clean -C tools diff --git a/applications/jpip/README b/applications/jpip/README new file mode 100644 index 00000000..90cc956e --- /dev/null +++ b/applications/jpip/README @@ -0,0 +1,141 @@ +======================================================================== + OpenJPIP software 1.0 ReadMe + +OpenJPEG: +http://www.openjpeg.org + +Written by: +Kaori Hagihara +UCL/SST/ICTM/ELEN +February 18 2011 +======================================================================== + +Contents: +1. Introduction +2. License +3. System requirements +4. Implementing instructions +5. JP2 encoding instructions + + +---------- +1. Introduction +---------- + +OpenJPIP software is an implementation of JPEG 2000 Part9: Interactivity tools, APIs and protocols (JPIP). +( For more info about JPIP, check the website: http://www.jpeg.org/jpeg2000/j2kpart9.html) +The current implementation uses some results from the 2KAN project (http://www.2kan.org). + +First Version 1.0 covers: + - JPT-stream (Tile based) media types + - Session, channels, cache model managements + - JPIP over HTTP + - Indexing JPEG 2000 files + - Embedding XML formatted metadata + - Region Of Interest (ROI) requests + +---------- +2. License +---------- + +This software is released under the BSD license, anybody can use or modify the library, even for commercial applications. +The only restriction is to retain the copyright in the sources or the binaries documentation. +Neither the author, nor the university accept any responsibility for any kind of error or data loss which may occur during usage. + +---------- +3. System requirements +---------- + + - OpenJPEG library (currently assumes it is installed on the system => will not use the one built higher in the directory structure) + - FastCGI development kit (C libraries) at server (http://www.fastcgi.com) + - Java application launcher at client + - Kakadu software ( http://www.kakadusoftware.com). Currently required to encode jpeg 2000 images with tile-parts. This will be implemented soon in openjpeg, making this requirement obsolete. + + - Xerces2 java XML parser on the client for accessing embedded image metadata (http://xerces.apache.org/xerces2-j) + +We tested this software with a virtual server running on the same Linux machine as the clients. Currently, it works only on linux or macosx platforms, windows version should come later. + +---------- +4. Building instructions +---------- + +A Makefile is available in the same directory as this README file. Simply type 'make' and it will build all the required C-executables. +Concerning the java-based opj_viewer, simply type 'ant' in the corresponding directory (requires 'ant' utility of course) + +CMake files ar planned to be included ASAP. + +The documentation can be build this way (requires doxygen utility): + cd doc + doxygen Doxyfile + +---------- +5. Usage +---------- + +Preliminary notes : + * HTML documentation is available at http://www.openjpeg.org/jpip/doc/html + * Example image is available at http://www.openjpeg.org/jpip/data/copenhague1.zip (20 Mb !) + +Webserver: + You need a webserver running with the fastcgi module enabled and correctly configured. + For Apache, add the following line to your /etc/apache2/mods-available/fastcgi.conf configuration file: + + FastCGIExternalServer /var/www/myFCGI -host localhost:3000 + + where /var/www is your DocumentRoot. + Please refer to 'http://www.openjpeg.org/jpip/doc/ApacheFastCGITutorial.pdf' for more details. + +Server: + 1. Store JP2 files in the same directory as opj_server + + 2. Launch opj_server from the server terminal: + % spawn-fcgi -f ./opj_server -p 3000 -n + +Client: + 1. Launch image decoding server, and keep it alive as long as image viewers are open + % ./opj_dec_server + + You might prefer to implement this program from another directory since cache files are saved in the working directory. + % mkdir cache + % cd cache + % ../opj_dec_server + + 2. Open image viewers (as many as needed) + % java -jar opj_viewer.jar http://hostname/myFCGI JP2_filename.jp2 + ( The arguments + - http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting) + - JP2_filename.jp2 is the name of a JP2 file available on the server.) + Image viewer GUI instructions: + Scale up request: Enlarge the window + ROI request: Select a region by mouse click and drag, then click inside the red frame of the selected region + + Annotate image with ROI information in XML metadata: Click button "Region Of Interest" + Open a new window presenting an aligned image with a locally stored image: Click button "Image Registration" (Under Construction) + + 3. Quit the image decoding server through the telnet, be sure all image viewers are closed + % telnet localhost 5000 + quit + +---------- +5. JP2 encoding instructions +---------- + +An example to encode a TIF image "copenhague1.tif" at resolution 4780x4050, 8bit/pixel, grayscale. + + 1. J2K encoding using Kakadu with an option which introduces the tile-part flag at each resolution level + % ./kdu_compress -i copenhague1.tif -o copenhague1.j2k Corder=RPCL ORGtparts=R Stiles={256,256} + + 2. JP2 encoding with embedding indexing data + % ./index_create copenhague1.j2k copenhague1.jp2 2 + +