Skip to content

Commit

Permalink
Added (limited) support for reading data compressed with COMPRESS (ol…
Browse files Browse the repository at this point in the history
…d-school ICS files).
  • Loading branch information
clluengo committed Jun 16, 2010
1 parent 27cd5d4 commit 000dc8d
Show file tree
Hide file tree
Showing 28 changed files with 539 additions and 157 deletions.
2 changes: 1 addition & 1 deletion Documentation/Credits.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down
12 changes: 7 additions & 5 deletions Documentation/Enums.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down Expand Up @@ -94,10 +94,12 @@ <h3 class="ident"><a name="Ics_Compression"></a>Ics_Compression</h3>
<tt class="keyword">compress</tt> utility, which uses LZW compression.
When setting this value for writing, it is automatically translated to
<tt class="constant">IcsCompr_gzip</tt>, which is a better method.
Currently the library is not able to read files written with this
compression method. Manually <tt class="keyword">uncompress</tt>
the .ids file and edit the <tt class="constant">'.ics'</tt> header
to read <tt class="keyword">compression uncompressed</tt>.</li>
Files written with this method can be read, but only if all data is
read in one go. That is, block-wise reading is not supported. For more
flexibility, it is possible to manually <tt class="keyword">uncompress</tt>
(<tt class="keyword">gunzip</tt> is also able to do this) the .ids file
and edit the <tt class="constant">'.ics'</tt> header to read
<tt class="keyword">compression uncompressed</tt>.</li>

<li><tt class="constant">IcsCompr_gzip</tt>: Using the
<tt class="keyword">gzip</tt> compression method
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Ics_DataRepresentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down
5 changes: 4 additions & 1 deletion Documentation/Ics_Error.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down Expand Up @@ -59,6 +59,9 @@ <h3 class="ident">IcsErr_Alloc</h3>
<h3 class="ident">IcsErr_BitsVsSizeConfl</h3>
<p>Image size conflicts with bits per element.</p>

<h3 class="ident">IcsErr_BlockNotAllowed</h3>
<p>It is not possible to read COMPRESS-compressed data in blocks.</p>

<h3 class="ident">IcsErr_BufferTooSmall</h3>
<p>The buffer was too small to hold the given ROI. </p>

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Ics_Header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Ics_ImelRepresentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down
16 changes: 15 additions & 1 deletion Documentation/LowLevelFunctions.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down Expand Up @@ -172,8 +172,14 @@ <h3 class="ident"><a name="IcsReadIdsBlock"></a>IcsReadIdsBlock</h3>
<p>Reads image data block from disk. You need to call
<tt class="typeident"><a href="#IcsOpenIds">IcsOpenIds</a></tt> first.</p>

<p>When the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>,
this function can only be called once. That is, only one block of data, starting
at the beginning, can be read from the file.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_BitsVsSizeConfl</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
<tt class="constant">IcsErr_EndOfStream</tt>,
Expand All @@ -196,8 +202,12 @@ <h3 class="ident"><a name="IcsSetIdsBlock"></a>IcsSetIdsBlock</h3>
or <tt class="constant">SEEK_CUR</tt>, defined in
<tt class="preprocess">&lt;stdio.h&gt;</tt>.</p>

<p>This function does currently not work when the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
<tt class="constant">IcsErr_EndOfStream</tt>,
Expand All @@ -216,8 +226,12 @@ <h3 class="ident"><a name="IcsSkipIdsBlock"></a>IcsSkipIdsBlock</h3>
<p>Skips image data block on disk. You need to call
<tt class="typeident"><a href="#IcsOpenIds">IcsOpenIds</a></tt> first.</p>

<p>This function does currently not work when the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
<tt class="constant">IcsErr_EndOfStream</tt>,
Expand Down
28 changes: 27 additions & 1 deletion Documentation/TopLevelFunctions.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down Expand Up @@ -144,9 +144,13 @@ <h3 class="ident"><a name="IcsLoadPreview"></a>IcsLoadPreview</h3>
integers. The slice is chosen with <tt class="varident">planenumber</tt> (see
<tt class="funcident"><a href="#IcsGetPreviewData">IcsGetPreviewData</a></tt>).

<p>This function does currently not work when the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BitsVsSizeConfl</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_BufferTooSmall</tt>,
<tt class="constant">IcsErr_CompressionProblem</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
Expand Down Expand Up @@ -298,10 +302,16 @@ <h3 class="ident"><a name="IcsGetDataBlock"></a>IcsGetDataBlock</h3>
<p>Read a portion of the actual image data from an ICS file.
<tt class="varident">n</tt> is the size of the buffer
<tt class="varident">dest</tt> in bytes.</p>

<p>When the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>,
this function can only be called once. That is, only one block of data, starting
at the beginning, can be read from the file.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BitsVsSizeConfl</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
<tt class="constant">IcsErr_EndOfStream</tt>,
Expand Down Expand Up @@ -338,9 +348,13 @@ <h3 class="ident"><a name="IcsGetDataWithStrides"></a>IcsGetDataWithStrides</h3>
equal to the dimensionality of the data as returned by
<tt class="funcident"><a href="#IcsGetLayout">IcsGetLayout</a></tt></p>

<p>This function does currently not work when the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BitsVsSizeConfl</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
<tt class="constant">IcsErr_EndOfStream</tt>,
Expand Down Expand Up @@ -407,9 +421,13 @@ <h3 class="ident"><a name="IcsGetPreviewData"></a>IcsGetPreviewData</h3>
<tt><span class="constant">m</span> + <span class="constant">n</span>*<span class="varident">dims</span>[<span class="constant">2</span>] +
<span class="constant">k</span>*<span class="varident">dims</span>[<span class="constant">2</span>]*<span class="varident">dims</span>[<span class="constant">3</span>]</tt>.</p>

<p>This function does currently not work when the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BitsVsSizeConfl</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_BufferTooSmall</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
Expand Down Expand Up @@ -445,9 +463,13 @@ <h3 class="ident"><a name="IcsGetROIData"></a>IcsGetROIData</h3>
set to <tt class="constant">NULL</tt>, the default is used (the offset is 0, the size
is equal to the image size, and the sampling is 1 in each direction).</p>

<p>This function does currently not work when the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BitsVsSizeConfl</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_BufferTooSmall</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
Expand Down Expand Up @@ -490,8 +512,12 @@ <h3 class="ident"><a name="IcsSkipDataBlock"></a>IcsSkipDataBlock</h3>
<tt class="funcident"><a href="#IcsGetROIData">IcsGetROIData</a></tt>, which
might simplifies this task.</p>

<p>This function does currently not work when the data is compressed with
<tt class="constant"><a href="Enums.html#Ics_Compression">IcsCompr_compress</a></tt>.</p>

<p class="info"><span class="headtxt">errors</span>:
<tt class="constant">IcsErr_Alloc</tt>,
<tt class="constant">IcsErr_BlockNotAllowed</tt>,
<tt class="constant">IcsErr_CorruptedStream</tt>,
<tt class="constant">IcsErr_DecompressionProblem</tt>,
<tt class="constant">IcsErr_EndOfStream</tt>,
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<div class="navbar">
<ul>
Expand Down Expand Up @@ -79,7 +79,7 @@ <h2>Reading ICS</h2>
<span class="typeident"><a href="Ics_Header.html">ICS</a></span>* <span class="varident">ip</span>;
<span class="typeident"><a href="Enums.html#Ics_DataType">Ics_DataType</a></span> <span class="varident">dt</span>;
<span class="keyword">int</span> <span class="varident">ndims</span>;
<span class="keyword">int</span> <span class="varident">dims</span>[<span class="constant">ICS_MAXDIM</span>];
<span class="keyword">size_t</span> <span class="varident">dims</span>[<span class="constant">ICS_MAXDIM</span>];
<span class="keyword">size_t</span> <span class="varident">bufsize</span>;
<span class="keyword">void</span>* <span class="varident">buf</span>;
<span class="typeident"><a href="Ics_Error.html">Ics_Error</a></span> <span class="varident">retval</span>;
Expand Down
4 changes: 2 additions & 2 deletions Documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</head>

<body>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2009 by Cris Luengo and others.</p>
<p class=header>libics v.1.5 Online Documentation. &copy;2000-2010 by Cris Luengo and others.</p>

<h1 class="title">libics v.1.5<br>
<h1>libics v.1.5<br>
<span class="subtitle">Image Cytometry Standard file reading and writing.</span></h1>

<p>This is the reference library for ICS (Image Cytometry Standard), an
Expand Down
Loading

0 comments on commit 000dc8d

Please sign in to comment.