diff --git a/Documentation/Credits.html b/Documentation/Credits.html index cca2e1a..1c34640 100644 --- a/Documentation/Credits.html +++ b/Documentation/Credits.html @@ -10,7 +10,7 @@
-libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
Image size conflicts with bits per element.
+It is not possible to read COMPRESS-compressed data in blocks.
+The buffer was too small to hold the given ROI.
diff --git a/Documentation/Ics_Header.html b/Documentation/Ics_Header.html index 6585979..219ee4e 100644 --- a/Documentation/Ics_Header.html +++ b/Documentation/Ics_Header.html @@ -10,7 +10,7 @@ -libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
Reads image data block from disk. You need to call IcsOpenIds first.
+When the data is compressed with + IcsCompr_compress, + this function can only be called once. That is, only one block of data, starting + at the beginning, can be read from the file.
+errors: IcsErr_BitsVsSizeConfl, + IcsErr_BlockNotAllowed, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, IcsErr_EndOfStream, @@ -196,8 +202,12 @@
This function does currently not work when the data is compressed with + IcsCompr_compress.
+errors: IcsErr_Alloc, + IcsErr_BlockNotAllowed, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, IcsErr_EndOfStream, @@ -216,8 +226,12 @@
Skips image data block on disk. You need to call IcsOpenIds first.
+This function does currently not work when the data is compressed with + IcsCompr_compress.
+errors: IcsErr_Alloc, + IcsErr_BlockNotAllowed, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, IcsErr_EndOfStream, diff --git a/Documentation/TopLevelFunctions.html b/Documentation/TopLevelFunctions.html index 77dfbdf..b07d3d2 100644 --- a/Documentation/TopLevelFunctions.html +++ b/Documentation/TopLevelFunctions.html @@ -10,7 +10,7 @@
-libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
This function does currently not work when the data is compressed with + IcsCompr_compress.
+errors: IcsErr_Alloc, IcsErr_BitsVsSizeConfl, + IcsErr_BlockNotAllowed, IcsErr_BufferTooSmall, IcsErr_CompressionProblem, IcsErr_CorruptedStream, @@ -298,10 +302,16 @@
Read a portion of the actual image data from an ICS file. n is the size of the buffer dest in bytes.
+ +When the data is compressed with + IcsCompr_compress, + this function can only be called once. That is, only one block of data, starting + at the beginning, can be read from the file.
errors: IcsErr_Alloc, IcsErr_BitsVsSizeConfl, + IcsErr_BlockNotAllowed, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, IcsErr_EndOfStream, @@ -338,9 +348,13 @@
This function does currently not work when the data is compressed with + IcsCompr_compress.
+errors: IcsErr_Alloc, IcsErr_BitsVsSizeConfl, + IcsErr_BlockNotAllowed, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, IcsErr_EndOfStream, @@ -407,9 +421,13 @@
This function does currently not work when the data is compressed with + IcsCompr_compress.
+errors: IcsErr_Alloc, IcsErr_BitsVsSizeConfl, + IcsErr_BlockNotAllowed, IcsErr_BufferTooSmall, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, @@ -445,9 +463,13 @@
This function does currently not work when the data is compressed with + IcsCompr_compress.
+errors: IcsErr_Alloc, IcsErr_BitsVsSizeConfl, + IcsErr_BlockNotAllowed, IcsErr_BufferTooSmall, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, @@ -490,8 +512,12 @@
This function does currently not work when the data is compressed with + IcsCompr_compress.
+errors: IcsErr_Alloc, + IcsErr_BlockNotAllowed, IcsErr_CorruptedStream, IcsErr_DecompressionProblem, IcsErr_EndOfStream, diff --git a/Documentation/Usage.html b/Documentation/Usage.html index 01e39ac..bb7abc6 100644 --- a/Documentation/Usage.html +++ b/Documentation/Usage.html @@ -10,7 +10,7 @@
-libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
libics v.1.5 Online Documentation. ©2000-2009 by Cris Luengo and others.
+libics v.1.5 Online Documentation. ©2000-2010 by Cris Luengo and others.
-This is the reference library for ICS (Image Cytometry Standard), an
diff --git a/Documentation/libics.css b/Documentation/libics.css
index 247348f..f2565ea 100644
--- a/Documentation/libics.css
+++ b/Documentation/libics.css
@@ -1,5 +1,5 @@
/*
- * Style file for libics documentation. (c)2000-2006 by Cris Luengo.
+ * Style file for libics documentation. (c)2000-2010 by Cris Luengo.
*/
html {
@@ -8,7 +8,7 @@ html {
body {
color: black;
- background-color: #DDD;
+ background-color: #FFF;
max-width: 44em;
margin-left: 10em;
min-margin-right: 0.5em;
@@ -35,13 +35,11 @@ h1 {
padding-top: 1em;
margin-bottom: 2em;
padding-bottom: 1em;
- background-color: #BBF;
+ background-color: #CCF;
+ border: 1px solid black;
color: black;
}
-h1 span.small { /* for title on index.html */
- font-size: 50%;
-}
h1 span.subtitle { /* for title on index.html */
font-size: 70%;
}
@@ -51,26 +49,27 @@ h2 {
font-weight: normal;
text-align: center;
margin-top: 2em;
- padding-top: 0.5em;
- border-top: 0.5em solid #BBF;
margin-bottom: 1em;
- padding-bottom: 0.5em;
- background-color: #D7D7DD;
+ padding: 0.3em;
+ /*border-top: 0.5em solid #DDF;*/
+ /*border-bottom: 0.5em solid #DDF;*/
+ border: 1px solid black;
+ background-color: #CCF;
}
h3 {
font-size: 120%;
font-weight: normal;
- margin-top: 1em;
+ margin-top: 2em;
margin-bottom: 0.5em;
text-align: left;
+ padding: 0.3em;
+ border: 1px solid black;
+ background-color: #EEF;
}
h3.ident { /* function / variable / constant name */
- margin-top: 2em;
- padding: 0.5em;
- border: 1px solid black;
- background-color: #D7D7DD;
+ font-family: "Courier New", monospace;
}
p {
@@ -108,13 +107,22 @@ p.header { /* banner on the top of each page */
border-bottom: 1px solid black;
}
+::-moz-selection {
+ color: #FFF;
+ background-color: #666680;
+}
+::selection {
+ color: #FFF;
+ background-color: #666680;
+}
+
:link, :visited {
color: #007;
text-decoration: underline;
}
a:hover {
color: black;
- background-color: #BBF;
+ background-color: #CCF;
}
ul {
@@ -158,22 +166,22 @@ div.navbar a {
display: block;
width: 100%;
padding: 1ex 0ex;
- background-color: #DDD;
+ background-color: #EEE;
position: relative;
top: -0.5em;
left: -0.5em;
border: 1px solid black;
}
div.navbar a:hover {
- background-color: #BBF;
+ background-color: #CCF;
}
div.navbar a.selected {
color: black;
text-decoration: none;
- background-color: #BBF;
+ background-color: #CCF;
}
div.navbar ul ul { /* 2nd order menus */
- background-color: #DDD;
+ background-color: #EEE;
margin-bottom: 1ex;
border: 1px solid black;
border-top: none;
@@ -183,7 +191,7 @@ div.navbar ul ul { /* 2nd order menus */
width: 100%;
}
div.navbar ul ul li {
- background-color: #BBF;
+ background-color: #CCF;
margin: 0ex;
font-size: 80%;
}
@@ -200,7 +208,7 @@ div.navbar ul ul ul { /* 3rd order menus */
width: auto;
}
div.navbar ul ul ul li {
- background-color: #DDD;
+ background-color: #EEE;
font-size: 100%;
}
diff --git a/Makefile b/Makefile
index 449a1c6..bc936bd 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ host_triplet = x86_64-unknown-linux-gnu
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(srcdir)/libics_conf.h.in \
- $(top_srcdir)/configure INSTALL config.guess config.sub \
+ $(top_srcdir)/configure INSTALL TODO config.guess config.sub \
depcomp install-sh ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -64,10 +64,10 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libics_la_LIBADD =
-am_libics_la_OBJECTS = libics_binary.lo libics_data.lo libics_gzip.lo \
- libics_history.lo libics_preview.lo libics_read.lo \
- libics_sensor.lo libics_test.lo libics_top.lo libics_util.lo \
- libics_write.lo
+am_libics_la_OBJECTS = libics_binary.lo libics_compress.lo \
+ libics_data.lo libics_gzip.lo libics_history.lo \
+ libics_preview.lo libics_read.lo libics_sensor.lo \
+ libics_test.lo libics_top.lo libics_util.lo libics_write.lo
libics_la_OBJECTS = $(am_libics_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -97,20 +97,20 @@ DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
-ACLOCAL = ${SHELL} /home/cris/localhome/src/libics/missing --run aclocal-1.9
+ACLOCAL = ${SHELL} /local/home/cris/src/libics/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
-AMTAR = ${SHELL} /home/cris/localhome/src/libics/missing --run tar
+AMTAR = ${SHELL} /local/home/cris/src/libics/missing --run tar
AR = ar
-AUTOCONF = ${SHELL} /home/cris/localhome/src/libics/missing --run autoconf
-AUTOHEADER = ${SHELL} /home/cris/localhome/src/libics/missing --run autoheader
-AUTOMAKE = ${SHELL} /home/cris/localhome/src/libics/missing --run automake-1.9
+AUTOCONF = ${SHELL} /local/home/cris/src/libics/missing --run autoconf
+AUTOHEADER = ${SHELL} /local/home/cris/src/libics/missing --run autoheader
+AUTOMAKE = ${SHELL} /local/home/cris/src/libics/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
-CFLAGS = -g -O2
+CFLAGS = -fPIC
CPP = gcc -E
-CPPFLAGS =
+CPPFLAGS = -I/home/cris/include
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
@@ -131,7 +131,7 @@ INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
-LDFLAGS =
+LDFLAGS = -L/home/cris/lib
LIBOBJS =
LIBS = -lm -lz
LIBTOOL = $(SHELL) $(top_builddir)/libtool
@@ -140,7 +140,7 @@ LTLIBOBJS =
MAINT = #
MAINTAINER_MODE_FALSE =
MAINTAINER_MODE_TRUE = #
-MAKEINFO = ${SHELL} /home/cris/localhome/src/libics/missing --run makeinfo
+MAKEINFO = ${SHELL} /local/home/cris/src/libics/missing --run makeinfo
OBJEXT = o
PACKAGE = libics
PACKAGE_BUGREPORT =
@@ -154,7 +154,7 @@ SED = /bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
-VERSION = 1.5.2
+VERSION = 1.5.2dev
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
@@ -185,14 +185,14 @@ host_os = linux-gnu
host_vendor = unknown
includedir = ${prefix}/include
infodir = ${prefix}/info
-install_sh = /home/cris/localhome/src/libics/install-sh
+install_sh = /local/home/cris/src/libics/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
-prefix = /usr/local
+prefix = /home/cris
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
@@ -207,6 +207,7 @@ libics_la_LDFLAGS = -version-info $(ICS_LT_VERSION)
# distributed, except for libics_conf.h, which is generated from
# libics_conf.h.in:
libics_la_SOURCES = libics_binary.c \
+ libics_compress.c \
libics_data.c \
libics_gzip.c \
libics_history.c \
@@ -233,7 +234,8 @@ EXTRA_DIST = INSTALL \
README \
bootstrap.sh \
Makefile.bcc \
- Makefile.vc \
+ Makefile.vc6 \
+ Makefile.vc9 \
Documentation/index.html \
Documentation/Credits.html \
Documentation/Documentation.html \
@@ -363,6 +365,7 @@ distclean-compile:
-rm -f *.tab.c
include ./$(DEPDIR)/libics_binary.Plo
+include ./$(DEPDIR)/libics_compress.Plo
include ./$(DEPDIR)/libics_data.Plo
include ./$(DEPDIR)/libics_gzip.Plo
include ./$(DEPDIR)/libics_history.Plo
diff --git a/Makefile.am b/Makefile.am
index 03b1cac..0483456 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,6 +8,7 @@ libics_la_LDFLAGS = -version-info $(ICS_LT_VERSION)
# distributed, except for libics_conf.h, which is generated from
# libics_conf.h.in:
libics_la_SOURCES = libics_binary.c \
+ libics_compress.c \
libics_data.c \
libics_gzip.c \
libics_history.c \
@@ -32,7 +33,8 @@ EXTRA_DIST = INSTALL \
README \
bootstrap.sh \
Makefile.bcc \
- Makefile.vc \
+ Makefile.vc6 \
+ Makefile.vc9 \
Documentation/index.html \
Documentation/Credits.html \
Documentation/Documentation.html \
diff --git a/Makefile.bcc b/Makefile.bcc
index 52023ac..6360456 100644
--- a/Makefile.bcc
+++ b/Makefile.bcc
@@ -43,6 +43,7 @@ LIBOBJECTS = libics_read.obj \
libics_write.obj \
libics_binary.obj \
libics_gzip.obj \
+ libics_compress.obj \
libics_data.obj \
libics_util.obj \
libics_top.obj \
diff --git a/Makefile.in b/Makefile.in
index 24fa057..7393af7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,7 +40,7 @@ host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(srcdir)/libics_conf.h.in \
- $(top_srcdir)/configure INSTALL config.guess config.sub \
+ $(top_srcdir)/configure INSTALL TODO config.guess config.sub \
depcomp install-sh ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -64,10 +64,10 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libics_la_LIBADD =
-am_libics_la_OBJECTS = libics_binary.lo libics_data.lo libics_gzip.lo \
- libics_history.lo libics_preview.lo libics_read.lo \
- libics_sensor.lo libics_test.lo libics_top.lo libics_util.lo \
- libics_write.lo
+am_libics_la_OBJECTS = libics_binary.lo libics_compress.lo \
+ libics_data.lo libics_gzip.lo libics_history.lo \
+ libics_preview.lo libics_read.lo libics_sensor.lo \
+ libics_test.lo libics_top.lo libics_util.lo libics_write.lo
libics_la_OBJECTS = $(am_libics_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -I.
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -207,6 +207,7 @@ libics_la_LDFLAGS = -version-info $(ICS_LT_VERSION)
# distributed, except for libics_conf.h, which is generated from
# libics_conf.h.in:
libics_la_SOURCES = libics_binary.c \
+ libics_compress.c \
libics_data.c \
libics_gzip.c \
libics_history.c \
@@ -233,7 +234,8 @@ EXTRA_DIST = INSTALL \
README \
bootstrap.sh \
Makefile.bcc \
- Makefile.vc \
+ Makefile.vc6 \
+ Makefile.vc9 \
Documentation/index.html \
Documentation/Credits.html \
Documentation/Documentation.html \
@@ -363,6 +365,7 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libics_binary.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libics_compress.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libics_data.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libics_gzip.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libics_history.Plo@am__quote@
diff --git a/Makefile.vc6 b/Makefile.vc6
index 1821f5f..6f4aeaf 100644
--- a/Makefile.vc6
+++ b/Makefile.vc6
@@ -43,6 +43,7 @@ LIBOBJECTS = libics_read.obj \
libics_write.obj \
libics_binary.obj \
libics_gzip.obj \
+ libics_compress.obj \
libics_data.obj \
libics_util.obj \
libics_top.obj \
diff --git a/Makefile.vc9 b/Makefile.vc9
index 282a638..f5f468d 100644
--- a/Makefile.vc9
+++ b/Makefile.vc9
@@ -48,6 +48,7 @@ SOURCES = libics_read.obj \
libics_write.obj \
libics_binary.obj \
libics_gzip.obj \
+ libics_compress.obj \
libics_data.obj \
libics_util.obj \
libics_top.obj \
diff --git a/README b/README
index 74286b9..eaaf62e 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
- libics v.1.5.2
+ libics v.1.5.2dev
Image Cytometry Standard file reading and writing.
This is the reference library for ICS (Image Cytometry Standard), an
@@ -126,10 +126,11 @@ Which ultimately is based upon stuff written by:
HISTORY
=============
-in CVS
+in CVS (1.5.2dev)
Added functionality:
- UNIX make files now also generate a shared object using libtool.
- Added a Makefile for MSVC9.
+ - Added code to read COMPRESS-compressed data (.ids.Z).
Changes / improvements / fixes:
- Fixed bug in IcsGetDataWithStrides() when stride[0]==1.
- Fixed buffer overflow in IcsInternAddHistory() when adding lots of
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..fe1a23a
--- /dev/null
+++ b/TODO
@@ -0,0 +1,25 @@
+libics to do list
+-----------------
+
+- Put test/ into CVS and have it run through the makefile system.
+
+- Add bzip2 support, or rather xz (through XZ Utils).
+
+- 1-bit-per-pixel data should be packed when written. Ics_DataType
+ should then add a Ics_uint1 or Ics_binary data type. Tomás Majtner
+ submitted some code that gets us pretty close to this.
+
+- IcsGetPreviewData() should look for dimensions labelled "x" and "y".
+ If one of them is not present, use first available dimension instead.
+ Read the data using IcsGetROIData(). Make sure the planes are counted
+ over the dimensions that are not considered "x" and "y".
+
+- The MATLAB MEX-files ICSREAD should also look for dimensions labelled
+ "x", "y", "z", "t" or "time" and "probe". Reorder so "probe" is at the
+ end, and x, y, z, t are in that order at the beginning.
+
+- Make a function IcsGetROIDataWithStrides(). IcsGetROIData() and
+ IcsGetDataWithStrides() should be direct calls to this function
+ with some NULL pointers. Maybe even macros?
+
+- IrfanView plugin should be updated, it still has a 3 year old bug.
diff --git a/configure b/configure
index 2cc7959..c019d8d 100755
--- a/configure
+++ b/configure
@@ -1825,7 +1825,7 @@ fi
# Define the identity of the package.
PACKAGE=libics
- VERSION=1.5.2
+ VERSION=1.5.2dev
cat >>confdefs.h <<_ACEOF
diff --git a/configure.in b/configure.in
index 2aeebd9..6b57d1a 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
dnl
dnl libics: Image Cytometry Standard file reading and writing.
dnl
-dnl Copyright (C) 2000-2009 Cris Luengo and others
+dnl Copyright (C) 2000-2010 Cris Luengo and others
dnl email: clluengo@sourceforge.net
dnl
dnl Script for automake and autoconfig.
@@ -14,7 +14,7 @@ AC_CONFIG_HEADERS([config.h libics_conf.h])
AC_CONFIG_MACRO_DIR([m4])
dnl Library version number (make sure to also change it in 'libics.h'):
-AM_INIT_AUTOMAKE(libics, 1.5.2)
+AM_INIT_AUTOMAKE(libics, 1.5.2dev)
AM_MAINTAINER_MODE
@@ -27,6 +27,9 @@ dnl
dnl How to update library version number
dnl ====================================
dnl
+dnl Update the version information only immediately before a public
+dnl release of the software. More frequent updates are unnecessary.
+dnl
dnl CURRENT: increment if the interface has additions, changes, removals.
dnl
dnl REVISION: increment any time the source changes; set to 0 if you
diff --git a/libics.h b/libics.h
index e3b8386..0e7d6da 100644
--- a/libics.h
+++ b/libics.h
@@ -1,7 +1,7 @@
/*
* libics: Image Cytometry Standard file reading and writing.
*
- * Copyright (C) 2000-2007 Cris Luengo and others
+ * Copyright (C) 2000-2010 Cris Luengo and others
* email: clluengo@users.sourceforge.net
*
* Large chunks of this library written by
@@ -38,7 +38,7 @@
extern "C" {
#endif
-#define ICSLIB_VERSION "1.5.2" /* also defined in configure.in */
+#define ICSLIB_VERSION "1.5.2dev" /* also defined in configure.in */
#if defined(__WIN32__) && !defined(WIN32)
#define WIN32
@@ -185,6 +185,7 @@ typedef enum {
IcsErr_OutputNotFilled, /* Non fatal error: the output buffer could not be completely filled (meaning that your buffer was too large) */
IcsErr_Alloc, /* Memory allocation error */
IcsErr_BitsVsSizeConfl, /* Image size conflicts with bits per element */
+ IcsErr_BlockNotAllowed, /* It is not possible to read COMPRESS-compressed data in blocks */
IcsErr_BufferTooSmall, /* The buffer was too small to hold the given ROI */
IcsErr_CompressionProblem, /* Some error occurred during compression */
IcsErr_CorruptedStream, /* The compressed input stream is currupted */
@@ -193,7 +194,6 @@ typedef enum {
IcsErr_EmptyField, /* Empty field (intern error) */
IcsErr_EndOfHistory, /* All history lines have already been returned */
IcsErr_EndOfStream, /* Unexpected end of stream */
- IcsErr_FailWriteLine, /* Failed to write a line in .ics file */
IcsErr_FCloseIcs, /* File close error on .ics file */
IcsErr_FCloseIds, /* File close error on .ids file */
IcsErr_FCopyIds, /* Failed to copy image data from temporary file on .ics file opened for updating */
@@ -204,19 +204,20 @@ typedef enum {
IcsErr_FTempMoveIcs, /* Failed to remane .ics file opened for updating */
IcsErr_FWriteIcs, /* File write error on .ics file */
IcsErr_FWriteIds, /* File write error on .ids file */
- IcsErr_IllegalROI, /* The given ROI extends outside the image */
+ IcsErr_FailWriteLine, /* Failed to write a line in .ics file */
IcsErr_IllIcsToken, /* Illegal ICS token detected */
IcsErr_IllParameter, /* A function parameter has a value that is not legal or does not match with a value previously given */
+ IcsErr_IllegalROI, /* The given ROI extends outside the image */
IcsErr_LineOverflow, /* Line overflow in ics file */
IcsErr_MissBits, /* Missing "bits" element in .ics file */
IcsErr_MissCat, /* Missing main category */
- IcsErr_MissingData, /* There is no Data defined */
IcsErr_MissLayoutSubCat, /* Missing layout subcategory */
IcsErr_MissParamSubCat, /* Missing parameter subcategory */
IcsErr_MissRepresSubCat, /* Missing representation subcategory */
IcsErr_MissSensorSubCat, /* Missing sensor subcategory */
IcsErr_MissSensorSubSubCat, /* Missing sensor subsubcategory */
IcsErr_MissSubCat, /* Missing sub category */
+ IcsErr_MissingData, /* There is no Data defined */
IcsErr_NoLayout, /* Layout parameters missing or not defined */
IcsErr_NoScilType, /* There doesn't exist a SCIL_TYPE value for this image */
IcsErr_NotIcsFile, /* Not an ICS file */
diff --git a/libics_binary.c b/libics_binary.c
index 3b08d8b..70f3206 100644
--- a/libics_binary.c
+++ b/libics_binary.c
@@ -1,7 +1,7 @@
/*
* libics: Image Cytometry Standard file reading and writing.
*
- * Copyright (C) 2000-2006 Cris Luengo and others
+ * Copyright (C) 2000-2010 Cris Luengo and others
* email: clluengo@users.sourceforge.net
*
* Large chunks of this library written by
@@ -373,6 +373,7 @@ Ics_Error IcsOpenIds (Ics_Header* IcsStruct)
br->ZlibStream = NULL;
br->ZlibInputBuffer = NULL;
#endif
+ br->CompressRead = 0;
IcsStruct->BlockRead = br;
#ifdef ICS_ZLIB
@@ -432,6 +433,13 @@ Ics_Error IcsReadIdsBlock (Ics_Header* IcsStruct, void* dest, size_t n)
break;
#endif
case IcsCompr_compress:
+ if (br->CompressRead) {
+ error = IcsErr_BlockNotAllowed;
+ } else {
+ error = IcsReadCompress (IcsStruct, dest, n);
+ br->CompressRead = 1;
+ }
+ break;
default:
error = IcsErr_UnknownCompression;
}
@@ -483,6 +491,8 @@ Ics_Error IcsSetIdsBlock (Ics_Header* IcsStruct, long offset, int whence)
break;
#endif
case IcsCompr_compress:
+ error = IcsErr_BlockNotAllowed;
+ break;
default:
error = IcsErr_UnknownCompression;
}
diff --git a/libics_compress.c b/libics_compress.c
new file mode 100644
index 0000000..88fae10
--- /dev/null
+++ b/libics_compress.c
@@ -0,0 +1,268 @@
+/*
+ * libics: Image Cytometry Standard file reading and writing.
+ *
+ * Copyright (C) 2000-2010 Cris Luengo and others
+ * email: clluengo@users.sourceforge.net
+ *
+ * Large chunks of this library written by
+ * Bert Gijsbers
+ * Dr. Hans T.M. van der Voort
+ * And also Damir Sudar, Geert van Kempen, Jan Jitze Krol,
+ * Chiel Baarslag and Fons Laan.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * FILE : libics_compress.c
+ *
+ * The following internal functions are contained in this file:
+ *
+ * IcsReadCompress ()
+ *
+ * This file is based on code from (N)compress 4.2.4.3, written by
+ * Spencer W. Thomas, Jim McKie, Steve Davies, Ken Turkowski, James
+ * A. Woods, Joe Orost, Dave Mack and Peter Jannesen between 1984 and
+ * 1992. The original code is public domain and obtainable from
+ * http://ncompress.sourceforge.net/ .
+ *
+ */
+
+#include