[ITK-users] OrientImageFilter flipping VectorImage

mbcx9rb9 richard.brown at ucl.ac.uk
Mon Jun 11 12:04:09 EDT 2018


After further investigation, the problem starts when the image is read.

std::cout << itk_image_orig->GetDirection();

for itk::Image<float, 3> gives:
1 0 0
0 1 0
0 0 -1

but for itk::VectorImage<float, 3> gives:
1 0 0
0 1 0
0 0 1

As I said, the headers are identical (the bits I can see, at least):
sizeof_hdr     348
data_type      FLOAT32
dim0           5
dim1           285
dim2           285
dim3           127
dim4           1
dim5           3
dim6           1
dim7           1
vox_units      mm
time_units     Unknown
datatype       16
nbyper         4
bitpix         32
pixdim0        0.000000
pixdim1        2.086260
pixdim2        2.086260
pixdim3        2.031250
pixdim4        1.000000
pixdim5        1.000000
pixdim6        1.000000
pixdim7        1.000000
vox_offset     352
cal_max        0.0000
cal_min        0.0000
scl_slope      1.000000
scl_inter      0.000000
phase_dim      0
freq_dim       0
slice_dim      0
slice_name     Unknown
slice_code     0
slice_start    0
slice_end      0
slice_duration 0.000000
time_offset    0.000000
intent         Unknown
intent_code    0
intent_name    
intent_p1      0.000000
intent_p2      0.000000
intent_p3      0.000000
qform_name     Scanner Anat
qform_code     1
qto_xyz:1      -2.086260  0.000000  -0.000000  296.248932
qto_xyz:2      0.000000  -2.086260  -0.000000  296.248932
qto_xyz:3      0.000000  0.000000  -2.031250  0.000000
qto_xyz:4      0.000000  0.000000  0.000000  1.000000
qform_xorient  Right-to-Left
qform_yorient  Anterior-to-Posterior
qform_zorient  Superior-to-Inferior
sform_name     Unknown
sform_code     0
sto_xyz:1      0.000000  0.000000  0.000000  0.000000
sto_xyz:2      0.000000  0.000000  0.000000  0.000000
sto_xyz:3      0.000000  0.000000  0.000000  0.000000
sto_xyz:4      0.000000  0.000000  0.000000  0.000000
sform_xorient  Unknown
sform_yorient  Unknown
sform_zorient  Unknown
file_type      NIFTI-1+
file_code      1
descrip        
aux_file  



--
Sent from: http://itk-users.7.n7.nabble.com/


More information about the Insight-users mailing list