aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image-seedee.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-06-02 15:26:18 +0200
committerThomas White <taw@physics.org>2023-06-02 15:26:18 +0200
commit447a5a8129295ec8bce1c9a6292595e3e96f3840 (patch)
tree947cc0a262b7d4e8c03734f3922a24c5f5d313ae /libcrystfel/src/image-seedee.c
parente03b82dd89295305e655bea301b321b7f8e15844 (diff)
Seedee: Handle u4< data type
Diffstat (limited to 'libcrystfel/src/image-seedee.c')
-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 60153591..ae52c3f9 100644
--- a/libcrystfel/src/image-seedee.c
+++ b/libcrystfel/src/image-seedee.c
@@ -84,6 +84,20 @@ static int load_seedee_data(struct panel_template *p,
}
}
+ } else if ( (array->datatype == 'u')
+ && (array->itemsize == 4)
+ && (array->byteorder == '<') )
+ {
+ int fs, ss;
+ uint32_t *in_data = (uint32_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 {
ERROR("Unrecognised data type %c%i%c\n",
array->datatype, array->itemsize, array->byteorder);