Refresh patches
Andreas Tille
3 years ago
0 | From: Tim Coalson <tsc5yc@mst.edu> | |
1 | Date: Mon, 1 Apr 2019 16:56:12 -0500 | |
2 | Subject: force endian of datatype example to make tests pass on bigendian | |
3 | systems | |
4 | ||
5 | --- | |
6 | example/datatype.cxx | 4 ++-- | |
7 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
8 | ||
9 | diff --git a/example/datatype.cxx b/example/datatype.cxx | |
10 | index a293856..1da380b 100644 | |
11 | --- a/example/datatype.cxx | |
12 | +++ b/example/datatype.cxx | |
13 | @@ -19,14 +19,14 @@ int main(int argc, char** argv) | |
14 | if (argc < 3) | |
15 | { | |
16 | cout << "usage: " << argv[0] << " <input cifti> <output cifti>" << endl; | |
17 | - cout << " rewrite the input cifti file to the output filename, using uint8 and data scaling." << endl; | |
18 | + cout << " rewrite the input cifti file to the output filename, using uint8 and data scaling, little-endian." << endl; | |
19 | return 1; | |
20 | } | |
21 | try | |
22 | { | |
23 | CiftiFile inputFile(argv[1]);//on-disk reading by default | |
24 | inputFile.setWritingDataTypeAndScaling(NIFTI_TYPE_UINT8, -1.0, 6.0);//tells it to use this datatype to best represent this specified range of values [-1.0, 6.0] whenever this instance is written | |
25 | - inputFile.writeFile(argv[2]);//if this is the same filename as the input, CiftiFile actually detects this and reads the input into memory first | |
26 | + inputFile.writeFile(argv[2], CiftiVersion(), CiftiFile::LITTLE);//if this is the same filename as the input, CiftiFile actually detects this and reads the input into memory first | |
27 | //otherwise, it will read and write one row at a time, using very little memory | |
28 | //inputFile.setWritingDataTypeNoScaling(NIFTI_TYPE_FLOAT32);//this is how you would revert back to writing as float32 without rescaling | |
29 | } catch (CiftiException& e) { |