summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-01 09:20:30 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2012-10-01 09:20:30 +0000
commit25cbfcf34afedf0e39f5a36d70b17d308a97e8ae (patch)
tree6c89914370aab01493ccd47cd25563313f615905 /src
parentcffc33a51c7a9f4b8cf460fdc7c02639b40d266d (diff)
[trunk] FolderReorgProposal task: cleanup doxygen
Update issue 177
Diffstat (limited to 'src')
-rw-r--r--src/bin/jpip/README149
-rwxr-xr-xsrc/lib/openjp3d/dwt.h1
-rwxr-xr-xsrc/lib/openjp3d/jp3d.c5
-rwxr-xr-xsrc/lib/openjp3d/jp3d.h4
-rwxr-xr-xsrc/lib/openjp3d/tgt.h1
-rw-r--r--src/lib/openmj2/mj2.c5
-rw-r--r--src/lib/openmj2/mj2.h6
7 files changed, 166 insertions, 5 deletions
diff --git a/src/bin/jpip/README b/src/bin/jpip/README
new file mode 100644
index 00000000..5bcb01fa
--- /dev/null
+++ b/src/bin/jpip/README
@@ -0,0 +1,149 @@
+========================================================================
+ OpenJPIP software 2.1 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).
+
+Version 2.1 covers:
+ - JPT-stream (Tile) and JPP-stream (Precinct) media types
+ - Session, channels, cache model managements
+ - JPIP over HTTP, HTTP requests and TCP return
+ - Indexing JPEG 2000 files
+ - Embedding XML formatted metadata
+ - Region Of Interest (ROI) requests
+ - Access to JP2 files with their URL
+
+----------
+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
+----------
+
+ - FastCGI development kit (C libraries) at server (http://www.fastcgi.com)
+ - libcURL library
+ - Java application launcher at client
+<Optional>
+ - 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.
+
+----------
+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)
+
+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
+
+ For shutting down JPIP server:
+ %GET http://hostname/myFCGI?quitJPIP
+ Notice, http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting)
+ Requst message "quitJPIP" can be changed in Makfile, modify -DQUIT_SIGNAL=\"quitJPIP\"
+
+Client:
+ 1. Launch image decoding server, and keep it alive as long as image viewers are open
+ % ./opj_dec_server [portnumber (50000 by default)]
+
+ 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 path/filename.jp2 [hostname] [portnumber] [stateless/session] [jptstream/jppstream] [tcp/udp]
+ ( The arguments
+ - http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting)
+ - path/filename.jp2 is the server local path or URL of a JP2 file
+ - host name of opj_dec_server, localhost by default
+ - portnumber of opj_dec_server, 50000 by default
+ - request type stateless for no caching, session (default) for caching
+ - return media type, JPT-stream tile based stream, or JPP-stream (default) precinct based stream
+ - auxiliary return protocol, tcp or udp (udp is not implemented yet), if not given, return data is filled in http chunk
+ 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
+ <If Xerces2 is installed>
+ % java -jar opj_viewer_xerces.jar http://hostname/myFCGI JP2_filename.jp2
+ 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 50000
+ quit
+
+----------
+5. JP2 encoding instructions
+----------
+
+An example to encode a TIF image "copenhague1.tif" at resolution 4780x4050, 8bit/pixel, grayscale.
+ % ./image_to_j2k -i copenhague1.tif -o copenhague1.jp2 -p RPCL -c [64,64] -t 640,480 -jpip -TP R
+
+ options
+ -jpip : embed index table 'cidx' box into the output JP2 file (obligation for JPIP)
+ -TP R : partition a tile into tile parts of different resolution levels (obligation for JPT-stream)
+
+<Option>
+ 3. Embed metadata into JP2 file
+ % ./addXMLinJP2 copenhague1.jp2 copenhague1.xml
+ Input metadata file "copenhague1.xml" looks like:
+ <xmlbox>
+ <roi name="island" x="1890" y="1950" w="770" h="310"/>
+ <roi name="ship" x="750" y="330" w="100" h="60"/>
+ <roi name="airport" x="650" y="1800" w="650" h="800"/>
+ <roi name="harbor" x="4200" y="1650" w="130" h="130"/>
+ <irt refimg="name1.jp2" m1="0.50" m2="-0.50" m3="0" m4="0.80" m5="-0.80" m6="0" m7="500" m8="1000" m9="0"/>
+ </xmlbox>
diff --git a/src/lib/openjp3d/dwt.h b/src/lib/openjp3d/dwt.h
index d87f799f..3fa781b1 100755
--- a/src/lib/openjp3d/dwt.h
+++ b/src/lib/openjp3d/dwt.h
@@ -96,5 +96,6 @@ Calcula el valor del escalón de cuantificación correspondiente a cada subbanda.
*/
void dwt_calc_explicit_stepsizes(opj_tccp_t * tccp, int prec);
/*@}*/
+/*@}*/
#endif /* __DWT_H */
diff --git a/src/lib/openjp3d/jp3d.c b/src/lib/openjp3d/jp3d.c
index 2fd5d02f..ec2a759d 100755
--- a/src/lib/openjp3d/jp3d.c
+++ b/src/lib/openjp3d/jp3d.c
@@ -2326,3 +2326,8 @@ bool j3d_encode(opj_j3d_t *j3d, opj_cio_t *cio, opj_volume_t *volume, char *inde
return true;
}
+/* ----------------------------------------------------------------------- */
+/*@}*/
+
+/*@}*/
+
diff --git a/src/lib/openjp3d/jp3d.h b/src/lib/openjp3d/jp3d.h
index 5d0978c0..02457224 100755
--- a/src/lib/openjp3d/jp3d.h
+++ b/src/lib/openjp3d/jp3d.h
@@ -31,13 +31,13 @@
#ifndef __J3D_H
#define __J3D_H
/**
-@file j3d.h
+@file jp3d.h
@brief The JPEG-2000 Codestream Reader/Writer (J3D)
The functions in J3D.C have for goal to read/write the several parts of the codestream: markers and data.
*/
-/** @defgroup J3D J3D - JPEG-2000 codestream reader/writer */
+/** @defgroup J3D J3D - JPEG-2000 PART 10 codestream reader/writer */
/*@{*/
#define J3D_CP_CSTY_PRT 0x01
diff --git a/src/lib/openjp3d/tgt.h b/src/lib/openjp3d/tgt.h
index ad8e88d8..2b54baf9 100755
--- a/src/lib/openjp3d/tgt.h
+++ b/src/lib/openjp3d/tgt.h
@@ -120,5 +120,6 @@ int tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold);
/*@}*/
/* ----------------------------------------------------------------------- */
void tgt_tree_dump (FILE *fd, opj_tgt_tree_t * tree);
+/*@}*/
#endif /* __TGT_H */
diff --git a/src/lib/openmj2/mj2.c b/src/lib/openmj2/mj2.c
index f5ab5f3f..4d87d7b8 100644
--- a/src/lib/openmj2/mj2.c
+++ b/src/lib/openmj2/mj2.c
@@ -2913,3 +2913,8 @@ void mj2_destroy_compress(opj_mj2_t *movie) {
}
opj_free(movie);
}
+
+/*@}*/
+
+/*@}*/
+
diff --git a/src/lib/openmj2/mj2.h b/src/lib/openmj2/mj2.h
index c0255707..15e0ed23 100644
--- a/src/lib/openmj2/mj2.h
+++ b/src/lib/openmj2/mj2.h
@@ -327,7 +327,7 @@ void mj2_destroy_decompress(opj_mj2_t *movie);
Setup the decoder decoding parameters using user parameters.
Decoding parameters are returned in mj2->j2k->cp.
@param movie MJ2 decompressor handle
-@param parameters decompression parameters
+@param mj2_parameters decompression parameters
*/
void mj2_setup_decoder(opj_mj2_t *movie, mj2_dparameters_t *mj2_parameters);
/**
@@ -372,8 +372,8 @@ Init a Standard MJ2 movie
int mj2_init_stdmovie(opj_mj2_t *movie);
/**
Read the structure of an MJ2 file
-@param File MJ2 input File
-@param movie J2 movie structure
+@param file MJ2 input File
+@param mj2 J2 movie structure
@return Returns 0 if successful, returns 1 otherwise
*/
int mj2_read_struct(FILE *file, opj_mj2_t *mj2);