aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-09-12 13:59:54 +0200
committerThomas White <taw@physics.org>2023-09-12 13:59:54 +0200
commitd76ef8af7081f507af500f554cb31a610c3e376f (patch)
tree30a71261c0a848cb2d06525973cce44f546e0c51
parent69550d6ef3a6f88f378f9a759b7a34a4486e7138 (diff)
Seedee: Handle format i4<
-rw-r--r--libcrystfel/src/image-seedee.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libcrystfel/src/image-seedee.c b/libcrystfel/src/image-seedee.c
index b4ae5179..2a4328ec 100644
--- a/libcrystfel/src/image-seedee.c
+++ b/libcrystfel/src/image-seedee.c
@@ -98,6 +98,20 @@ static int load_seedee_data(struct panel_template *p,
}
}
+ } else if ( (array->datatype == 'i')
+ && (array->itemsize == 4)
+ && (array->byteorder == '<') )
+ {
+ int fs, ss;
+ int32_t *in_data = (int32_t *)array->data;
+
+ for ( ss=0; ss<PANEL_HEIGHT(p); ss++ ) {
+ for ( fs=0; fs<PANEL_WIDTH(p); fs++ ) {
+ size_t idx = fs+p->orig_min_fs + (ss+p->orig_min_ss)*data_size_fs;
+ data[fs+ss*PANEL_WIDTH(p)] = in_data[idx];
+ }
+ }
+
} else if ( (array->datatype == 'f')
&& (array->itemsize == 8)
&& (array->byteorder == '<') )