-
Notifications
You must be signed in to change notification settings - Fork 13
/
README
388 lines (329 loc) · 15.2 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
libics v.1.6.8
Image Cytometry Standard file reading and writing.
This is the reference library for ICS (Image Cytometry Standard), an
open standard for writing images of any dimensionality and data type to
file, together with associated information regarding the recording
equipment or recorded subject.
ICS version 1.0 and 2.0
=============================
ICS stands for Image Cytometry Standard, and was first proposed in:
P. Dean, L. Mascio, D. Ow, D. Sudar, J. Mullikin, "Propsed
standard for image cytometry data files", Cytometry, n.11,
pp.561-569, 1990.
It writes 2 files, one is the header, with an '.ics' extension, and the
other is the actual image data (with an '.ids' extension.)
ICS version 2.0 extends this standard to allow for a more versatile
placement of the image data. It can now be placed either in the same
'.ics' file or inbedded in any other file, by specifying the file name
and the byte offset for the data.
The advantage of ICS over other open standards such as TIFF is that it
allows data of any type and dimensionality to be stored. A TIFF file
can contain a collection of 2D images; it's up to the user to determine
how these relate to each other. An ICS file can contain, for exmaple, a
5D image in which the 4th dimension is the light frequency and the 5th
time. Also, all of the information regarding the microscope settings
(or whatever instument was used to acquire the image) and the sample
preparation can be included in the file.
This library is distributed under the GNU LESSER GENERAL PUBLIC
LICENSE. See the file GNU_LICENSE for terms.
The libics library is currently maintained by Scientific Volume Imaging
(https://svi.nl). Please mail comments, bugs and feature requests to:
Documentation
==============================
Online documentation can be found at: https://svi-opensource.github.io/libics
Installation Instructions
===============================
Obtain the source distribution from
https://github.com/svi-opensource/libics
It is recommended you also install zlib (http://www.zlib.org).
- Compilation under UNIX / Linux / Mac OS X / Cygwin
Run the following commands from the source directory:
./configure
make
make install
Read the INSTALL file for more information.
The library can be tested for problems using
make check
- Compilation under Windows with Borland C++
Edit the paths defined at the beginning of Makefile.bcc, then type
make -f Makefile.bcc
from a command prompt in the source directory. This will create a file
libics.lib in the same directory. To build a dynamic library (DLL), type
make -f Makefile.bcc dynamic
The dynamic library libics.dll has an import library named
libics.dll.lib. To make a debug version add '-DDEBUG' to these commands.
To disable zlib support, remove the definition of ZLIB_SUPPORT from the
file Makefile.bcc.
When compiling a program that uses the dynamic library, you need to
define the USE_ICSLIB_DLL pre-processor variable.
- Compilation under Windows with Microsoft Visual C++ 9
Edit the path to Zlib defined at the beginning of Makefile.vc9, then
type
nmake /f Makefile.vc9
from a command prompt in the source directory. This will create a
dynamic library libics.dll in the same directory, and an import library
libics.lib. Change the definitions of SHARED or DEBUG in the makefile to
create static and/or debug versions of the library. To disable zlib
support, remove the definition of ZLIB_SUPPORT from the makefile.
When compiling a program that uses the dynamic library, you need to
define the USE_ICSLIB_DLL pre-processor variable.
- Compilation under Windows with older versions of Microsoft Visual C++
Edit the paths defined at the beginning of Makefile.vc6, then type
nmake /f Makefile.vc6
from a command prompt in the source directory. This will create a file
libics.lib in the same directory. To build a dynamic library, type
nmake /f Makefile.vc6 dynamic
The dynamic library libics.dll has an import library named
libics.dll.lib. To make a debug version add '/D DEBUG' to these
commands. To disable zlib support, remove the definition of ZLIB_SUPPORT
from the file Makefile.vc.
- Compilation with CMake under UNIX / Linux / Mac OS X / Cygwin
Run the following commands from outside the source directory
cmake <path/to/libics/sources>
make
make install
The library can be tested for problems using
make test
CMake can be used with the following options:
cmake ... -DCMAKE_BUILD_TYPE=Debug # build a debug version
cmake ... -DLIBICS_USE_ZLIB=Off # do not use zlib
cmake ... -DBUILD_SHARED_LIBS=On # build a shared library
cmake ... -DLIBICS_INCLUDE_CPP=Off # do not include the C++ interface
CMake projects using libics as a subproject can do
add_subdirectory(<path/to/libics/sources>)
target_link_libraries(target PRIVATE libics)
The include directory for libics will be automatically set, and the zlib
library will be linked if necessary.
- Compilation with cmake on Windows:
Type on the command line
cmake CMakeLists.txt
or use cmake GUI. Next, open sln file in Visual Studio and build solution.
CREDITS
=============
As of 2016, this library is maintained by Scientific Volume Imaging:
Scientific Volume Imaging Holding B.V.
Hilversum, The Netherlands.
https://www.svi.nl
This library was originally written and maintained by
Cris Luengo
(previously at) Delft University of Technology, Delft, NL
With help from
Bert Gijsbers, Scientific Volume Imaging BV, Hilversum, NL
(Most changes for version 1.3)
Frank de Jong, Delft University of Technology, Delft, NL
(IcsViewer utility improvements)
Fons Laan, Hubrecht Laboratorium, Utrecht, NL
(SCIL_Image compatability, make files, bug fixes)
Glenn Pierce
(Idea of opening in "rw" mode and history iterator)
David Svoboda, Masaryk University, Brno, Czech Republic
(Windows make files)
Peter Verveer, Scientific Volume Imaging BV, Hilversum, NL
(autoconf/automake script)
Paul Barber, University of Oxford, Oxford, United Kingdom
(cmake support)
Most of the code herein hasn't changed since the previous version, by
Dr. Hans T.M. van der Voort
Scientific Volume Imaging Holding B.V.
Hilversum, The Netherlands.
https://www.svi.nl
Which ultimately is based upon stuff written by:
Damir Sudar, Geert van Kempen, Jan Jitze Krol,
Chiel Baarslag, Fons Laan and Hans van der Voort.
HISTORY
=============
version 1.6.8
- Add support for the Matrix STED Microscope type.
version 1.6.7
- Remove sprintf() calls: these are declared deprecated by the
Apple clang compiler. Replace them with snprintf().
- Update Scientific Volume Imaging's street address.
version 1.6.6
- Remove unused variables, avoiding compiler warning.
- Reorder cases in libics_top.c to match enum order
- Prevent a NULL pointer dereference on ICS syntax error, instead return
an Ics error.
- Replace fseek by _fseeki64() on Windows (64-bit safe). Based on
a patch submitted by Patrick Steele at Bitplane.
- For reference, add #define lines for possible string values as
used by SVI Huygens.
version 1.6.5
- Fix typo that causes out-of-bounds read.
version 1.6.4
- Add support for the noiseGain sensor parameter.
- Updated documentation with a list of supported sensor parameters.
- Support for building shared library on Windows with MinGW (Contributed by
Andrew Sun).
version 1.6.3
- Add support for storing the parameters of multi-detector microscopes.
- Support for 64 bit integer images.
- C++ interface.
- Improved CMake support
- Various bug fixes.
version 1.6.2
- Various bug fixes.
version 1.6.1
- Various bug-fixes.
- Added SPIM parameters.
- Added scattering parameters.
- New functions that return ICS string properties without string copying.
- Enable the use of negative strides.
version 1.6.0
Added functionality:
- Read and write sensor states.
- Support for cmake (contributed by Paul Barber).
version 1.5.4
- Small patch for supporting older Visual Studio version.
version 1.5.3
Changes / improvements / fixes:
- Fixed documentation and made explicit the current default to version
2.0 files.
- Added a "links" page to the documentation.
- Fixed tests 1 and 2a, which didn't work for big-endian machines.
- IcsWriteIcs() no longer overwrites data in the ByteOrder array.
- Fixed a segmentation violation when trying to write an image with
more than 5 dimensions.
- Added STED and detector parameters
- Fixed a bug to read large compressed files.
- Moved distribution to to github
version 1.5.2
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).
- Added a test suite for the library.
Changes / improvements / fixes:
- Fixed bug in IcsGetDataWithStrides() when stride[0]==1.
- Fixed buffer overflow in IcsInternAddHistory() when adding lots of
history strings (not an exploitable vulnerability).
- Fixed bug in "l" option to IcsOpen, it behaved in the oposite way
to that advertised (bug #2943839).
The documentation still carries the version number 1.5.
version 1.5.1
Added functionality:
- IcsGetDataWithStrides() makes it easy to read in an ICS file into
a non-contiguous memory block such as an ROI, or to have different
dimension ordering in memory.
Changes / improvements / fixes:
- Fixed buffer overflow when trying to read a binary file (not an
exploitable vulnerability).
- Fixed bug in IcsInternAddHistory() if key==NULL.
- Rewrote IcsStrCpy(), it no longer needs the full len chars in dest
if src is shorter than len.
- The MATLAB MEX-files in support/matlab have finally been updated
to work on 64-bit platforms.
The documentation still carries the version number 1.5.
version 1.5
Added functionality:
- IcsSetIdsBlock() in low-level interface does fseek() on image data.
- Added "rw" mode to IcsOpen(). It's now possible to change metadata
in an ICS file.
- Added functions to delete, replace and retrieve history lines.
Changes / improvements / fixes:
- When reading and writing the ICS header file, the locale is set to
"C". This can be avoided with the "l" flag in IcsOpen().
- Fixed printf type mismatch according to bug #1245419.
- Added a bunch of 'const' modifiers according to feature request
#1245471.
- Reorganized a few things on the website and added a menu bar.
- Windows makefile changes relating to zlib.
- The strcasecmp/stricmp is finally resolved neatly.
- Renamed libics_compress.c to libics_gzip.c to prepare for the
inclusion of 'compress' decompression.
- Separated all history code into new libics_history.c file.
- Renamed a few internal functions in libics_write.c for consistency.
- Stop writing 0.0 in exponential notation.
- FileMode replaces Reading in the ICS data structure.
- Default 5th dimension now is "probe" instead of "p".
- The history lines are stored in a more useful fashion in the
IcsHeader struct. The struct itself changed.
version 1.4.1
Added functionality:
- Replaced config files with autoconf scripts.
Changes / improvements / fixes:
- The MAXPATHLEN define is replaced by a custom ICS_MAXPATHLEN. This
improves portability.
- The strcasecmp/stricmp thing is moved to where it matters:
libics_util.c
- Fixed compile bug when not linking with zlib.
- Moved web stuff to SourceForge.net.
- Changed the presentation page of the website a bit.
The documentation still carries the version number 1.4.
version 1.4
Added functionality:
- IcsSetDataWithStrides() allows writing data that is not stored in
the default x-y-z order, as well as a ROI in a larger image.
- IcsOpen() now also has a mode "rf" which avoids adding the ".ics"
extension to the given file name.
Changes / improvements / fixes:
- IcsVersion(), IcsReadIcs() and IcsGetIcsName() have an extra
parameter that indicates whether to add the extension to the given
file name or not.
- IcsInit() is now declared as a void function.
- The ICS structure has a new element: DataStrides.
- The file libics_compress.non.ansi.c is no longer.
- ICS_MAXDIM now is 10, up from 5.
- Allowing for axes scaling to be <= 0.
- Bugfix: small values are also written in scientific notation.
- Creation of DLL added to Windows Makefiles.
version 1.3 (Most changes by Bert Gijsbers)
Added functionality:
- Added PinholeSpacing to sensor parameters.
- IcsExtensionFind() finds extensions including .ids.Z and .ids.gz.
- IcsGetSensor and IcsSetSensor functions to get and set the sensor
parameters.
- IcsGetErrorText() returns string representation of error.
Changes / improvements / fixes:
- IcsGetIcsName() and IcsGetIdsName() now preserve the case in the
extension.
- 'struct _ICS' is now defined besides the 'ICS' typedef.
- IcsPrintIcs() would loop forever with non-zero sensor channels.
- Some %d format strings were called with a long int argument.
- Dimension types are now always size_t instead of int.
- Big improvements in the IcsViewer utility (by Frank de Jong).
version 1.2.1
A few small bug fixes:
- 12 bytes got lost because a free() call was missing.
- Reading a compressed file in blocks caused a SGV if the last imel
was included in the block (because of the CRC).
- support/icsviewer now adds some padding to each image line so that
Windows correctly displays the image.
The documentation still carries the version number 1.2.
version 1.2
Added functions:
- IcsGetROIData(), and the more general IcsGetDataBlock(),
IcsSkipDataBlock(). These funcions make it possible to read in
only a portion of the image data.
- IcsGetPreviewData() reads in a 2D sub-image, and converts it to
unsinged 8-bit integers for display.
- IcsLoadPreview() does the same, but just takes a file name. It
allocates the image buffer for you.
Changes / improvements / fixes:
- Many "unsigned int" parameters have been changed to "size_t". This
improves portability to 64-bit systems (and fixes some bugs too).
- Added return error codes to the documentation, as well as some
other interesting information.
- Corrected some bugs in the documentation.
- Added 'extern "C" {}' to the public header files so libics can be
used with C++.
version 1.1
Some improvements:
- Added support for the 'SCIL_TYPE' parameter (thanks to Fons Laan).
Call IcsSetScilType() or IcsGuessScilType() to write the parameter
to the ICS file.
- Any character is now allowed as a line separator, as specified in
the standard.
- ICS files with CR/LF pairs instead of CR characters only are now
also supported. The CR/LF pair problem is caused by some windows
applications that automatically convert 'text' files to the MS-DOS
format. These were not read by libics.
- Some low-level library functions have been renamed to make the
interface more consistent:
IcsRead() -> IcsReadIcs()
IcsWrite() -> IcsWriteIcs()
IdsRead() -> IcsReadIds()
IdsWrite() -> IcsWriteIds()
- The documentation has been updated and corrected.
version 1.0
Initial release.