Skip to content

Commit

Permalink
Add value range to roi in cif2cbf -- HJB
Browse files Browse the repository at this point in the history
  • Loading branch information
yayahjb committed Dec 4, 2017
1 parent d74fe55 commit 577ffce
Show file tree
Hide file tree
Showing 6 changed files with 235 additions and 104 deletions.
Empty file modified examples/batch_convert_minicbf.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion examples/cif2cbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ int main (int argc, char *argv [])
" [--{foi|frames-of-interest} frame[,framehigh] \\\n");
fprintf(stderr,
" [--{roi|region-of-interest}\n"
" fastlow,fasthigh[[,midlow,midhigh[,slowlow,slowhigh]] \\\n");
" fastlow,fasthigh[,midlow,midhigh[,slowlow,slowhigh[,vallow,valhigh]]]] \\\n");
fprintf(stderr,
" [--{add-data-array} \\\n");
fprintf(stderr,
Expand Down
3 changes: 2 additions & 1 deletion include/cbf_copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ extern "C" {
size_t fastdim, size_t middim, size_t slowdim,
size_t * fastlow, size_t * fasthigh,
size_t * midlow, size_t * midhigh,
size_t * slowlow, size_t * slowhigh);
size_t * slowlow, size_t * slowhigh,
double * valuelow, double * valuehigh);

/* Extract an ROI from an image array */

Expand Down
10 changes: 0 additions & 10 deletions src/cbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -4801,7 +4801,6 @@ int cbf_set_hashedvalue(cbf_handle handle, const char * value,

const char * ovalue;

int newhashes;

int ohashnext;

Expand Down Expand Up @@ -4837,13 +4836,6 @@ int cbf_set_hashedvalue(cbf_handle handle, const char * value,
undo any existing hash to the same row */

newhashes = 0;

if (cbf_find_column(handle,colhashnext)) {

newhashes = 1;

}

if (valuerow >= 0) {

Expand All @@ -4853,8 +4845,6 @@ int cbf_set_hashedvalue(cbf_handle handle, const char * value,
&& !cbf_find_column(handle, colhashnext)
&& !cbf_get_integervalue(handle, &ohashnext)) {

newhashes = 0;

cbf_failnez( cbf_compute_hashcode(ovalue, &ohashcode))

if (hashcode != ohashcode) {
Expand Down
44 changes: 22 additions & 22 deletions src/cbf_binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,23 +749,23 @@ int cbf_set_binary (cbf_node *column, unsigned int row,

int cbf_check_digest (cbf_node *column, unsigned int row)
{
cbf_file *file;
cbf_file *file=NULL;

long start;
long start=0L;

size_t size;
size_t size=0;

char old_digest [25], new_digest [25];

const char *byteorder;
const char *byteorder=NULL;

int id, bits, sign, type, checked_digest, realarray;
int id=0, bits=0, sign=0, type=0, checked_digest=0, realarray=0;

size_t dimover, dimfast, dimmid, dimslow;
size_t dimover=0, dimfast=0, dimmid=0, dimslow=0;

size_t padding;
size_t padding=0;

unsigned int compression;
unsigned int compression=0;


/* Parse the value */
Expand Down Expand Up @@ -841,17 +841,17 @@ int cbf_binary_parameters (cbf_node *column,
size_t *dimfast, size_t *dimmid, size_t *dimslow,
size_t *padding)
{
cbf_file *file;
cbf_file *file=NULL;

long start;
long start=0;

size_t size, file_elsize, file_nelem;
size_t size=0, file_elsize=0, file_nelem=0;

int text_bits, errorcode;
int text_bits=0, errorcode=0;

size_t text_dimover;
size_t text_dimover=0;

int text_sign;
int text_sign=0;


/* Check the digest (this will also decode it if necessary) */
Expand Down Expand Up @@ -968,20 +968,20 @@ int cbf_get_binary (cbf_node *column, unsigned int row, int *id,
const char **byteorder, size_t *dimover, size_t *dimfast, size_t *dimmid,
size_t *dimslow, size_t *padding)
{
cbf_file *file;
cbf_file *file=NULL;

long start;
long start=0;

int eltype_file, elsigned_file, elunsigned_file,
minelem_file, maxelem_file, bits, sign;
int eltype_file=0, elsigned_file=0, elunsigned_file=0,
minelem_file=0, maxelem_file=0, bits=0, sign=0;

unsigned int compression;
unsigned int compression=0;

size_t nelem_file;
size_t nelem_file=0;

size_t text_dimover;
size_t text_dimover=0;

size_t size;
size_t size=0;

/* Check the digest (this will also decode it if necessary) */

Expand Down
Loading

0 comments on commit 577ffce

Please sign in to comment.