Struct nifti::header::NiftiHeaderBuilder
[−]
[src]
pub struct NiftiHeaderBuilder { pub sizeof_hdr: Option<i32>, pub data_type: Option<[u8; 10]>, pub db_name: Option<[u8; 18]>, pub extents: Option<i32>, pub session_error: Option<i16>, pub regular: Option<u8>, pub dim_info: Option<u8>, pub dim: Option<[u16; 8]>, pub intent_p1: Option<f32>, pub intent_p2: Option<f32>, pub intent_p3: Option<f32>, pub intent_code: Option<i16>, pub datatype: Option<i16>, pub bitpix: Option<i16>, pub slice_start: Option<i16>, pub pixdim: Option<[f32; 8]>, pub vox_offset: Option<f32>, pub scl_slope: Option<f32>, pub scl_inter: Option<f32>, pub slice_end: Option<i16>, pub slice_code: Option<u8>, pub xyzt_units: Option<u8>, pub cal_max: Option<f32>, pub cal_min: Option<f32>, pub slice_duration: Option<f32>, pub toffset: Option<f32>, pub glmax: Option<i32>, pub glmin: Option<i32>, pub descrip: Option<Vec<u8>>, pub aux_file: Option<[u8; 24]>, pub qform_code: Option<i16>, pub sform_code: Option<i16>, pub quatern_b: Option<f32>, pub quatern_c: Option<f32>, pub quatern_d: Option<f32>, pub quatern_x: Option<f32>, pub quatern_y: Option<f32>, pub quatern_z: Option<f32>, pub srow_x: Option<[f32; 4]>, pub srow_y: Option<[f32; 4]>, pub srow_z: Option<[f32; 4]>, pub intent_name: Option<[u8; 16]>, pub magic: Option<[u8; 4]>, }
Builder for NiftiHeader
.
Fields
sizeof_hdr: Option<i32>
Header size, must be 348
data_type: Option<[u8; 10]>
Unused in NIFTI-1
db_name: Option<[u8; 18]>
Unused in NIFTI-1
extents: Option<i32>
Unused in NIFTI-1
session_error: Option<i16>
Unused in NIFTI-1
regular: Option<u8>
Unused in NIFTI-1
dim_info: Option<u8>
MRI slice ordering
dim: Option<[u16; 8]>
Data array dimensions
intent_p1: Option<f32>
1st intent parameter
intent_p2: Option<f32>
2nd intent parameter
intent_p3: Option<f32>
3rd intent parameter
intent_code: Option<i16>
NIFTI_INTENT_* code
datatype: Option<i16>
Defines the data type!
bitpix: Option<i16>
Number of bits per voxel
slice_start: Option<i16>
First slice index
pixdim: Option<[f32; 8]>
Grid spacings
vox_offset: Option<f32>
Offset into .nii file to reach the volume
scl_slope: Option<f32>
Data scaling: slope
scl_inter: Option<f32>
Data scaling: offset
slice_end: Option<i16>
Last slice index
slice_code: Option<u8>
Slice timing order
xyzt_units: Option<u8>
Units of pixdim[1..4]
cal_max: Option<f32>
Max display intensity
cal_min: Option<f32>
Min display intensity
slice_duration: Option<f32>
Time for 1 slice
toffset: Option<f32>
Time axis shift
glmax: Option<i32>
Unused in NIFTI-1
glmin: Option<i32>
Unused in NIFTI-1
descrip: Option<Vec<u8>>
Any text you like
aux_file: Option<[u8; 24]>
Auxiliary filename
qform_code: Option<i16>
NIFTI_XFORM_* code
sform_code: Option<i16>
NIFTI_XFORM_* code
quatern_b: Option<f32>
Quaternion b param
quatern_c: Option<f32>
Quaternion c param
quatern_d: Option<f32>
Quaternion d param
quatern_x: Option<f32>
Quaternion x shift
quatern_y: Option<f32>
Quaternion y shift
quatern_z: Option<f32>
Quaternion z shift
srow_x: Option<[f32; 4]>
1st row affine transform
srow_y: Option<[f32; 4]>
2nd row affine transform
srow_z: Option<[f32; 4]>
3rd row affine transform
intent_name: Option<[u8; 16]>
'name' or meaning of data
magic: Option<[u8; 4]>
Magic code. Must be b"ni1\0"
or b"ni+\0"
Methods
impl NiftiHeaderBuilder
[src]
fn sizeof_hdr(&mut self, value: i32) -> &mut Self
Header size, must be 348
fn data_type(&mut self, value: [u8; 10]) -> &mut Self
Unused in NIFTI-1
fn db_name(&mut self, value: [u8; 18]) -> &mut Self
Unused in NIFTI-1
fn extents(&mut self, value: i32) -> &mut Self
Unused in NIFTI-1
fn session_error(&mut self, value: i16) -> &mut Self
Unused in NIFTI-1
fn regular(&mut self, value: u8) -> &mut Self
Unused in NIFTI-1
fn dim_info(&mut self, value: u8) -> &mut Self
MRI slice ordering
fn dim(&mut self, value: [u16; 8]) -> &mut Self
Data array dimensions
fn intent_p1(&mut self, value: f32) -> &mut Self
1st intent parameter
fn intent_p2(&mut self, value: f32) -> &mut Self
2nd intent parameter
fn intent_p3(&mut self, value: f32) -> &mut Self
3rd intent parameter
fn intent_code(&mut self, value: i16) -> &mut Self
NIFTI_INTENT_* code
fn datatype(&mut self, value: i16) -> &mut Self
Defines the data type!
fn bitpix(&mut self, value: i16) -> &mut Self
Number of bits per voxel
fn slice_start(&mut self, value: i16) -> &mut Self
First slice index
fn pixdim(&mut self, value: [f32; 8]) -> &mut Self
Grid spacings
fn vox_offset(&mut self, value: f32) -> &mut Self
Offset into .nii file to reach the volume
fn scl_slope(&mut self, value: f32) -> &mut Self
Data scaling: slope
fn scl_inter(&mut self, value: f32) -> &mut Self
Data scaling: offset
fn slice_end(&mut self, value: i16) -> &mut Self
Last slice index
fn slice_code(&mut self, value: u8) -> &mut Self
Slice timing order
fn xyzt_units(&mut self, value: u8) -> &mut Self
Units of pixdim[1..4]
fn cal_max(&mut self, value: f32) -> &mut Self
Max display intensity
fn cal_min(&mut self, value: f32) -> &mut Self
Min display intensity
fn slice_duration(&mut self, value: f32) -> &mut Self
Time for 1 slice
fn toffset(&mut self, value: f32) -> &mut Self
Time axis shift
fn glmax(&mut self, value: i32) -> &mut Self
Unused in NIFTI-1
fn glmin(&mut self, value: i32) -> &mut Self
Unused in NIFTI-1
fn descrip(&mut self, value: Vec<u8>) -> &mut Self
Any text you like
fn aux_file(&mut self, value: [u8; 24]) -> &mut Self
Auxiliary filename
fn qform_code(&mut self, value: i16) -> &mut Self
NIFTI_XFORM_* code
fn sform_code(&mut self, value: i16) -> &mut Self
NIFTI_XFORM_* code
fn quatern_b(&mut self, value: f32) -> &mut Self
Quaternion b param
fn quatern_c(&mut self, value: f32) -> &mut Self
Quaternion c param
fn quatern_d(&mut self, value: f32) -> &mut Self
Quaternion d param
fn quatern_x(&mut self, value: f32) -> &mut Self
Quaternion x shift
fn quatern_y(&mut self, value: f32) -> &mut Self
Quaternion y shift
fn quatern_z(&mut self, value: f32) -> &mut Self
Quaternion z shift
fn srow_x(&mut self, value: [f32; 4]) -> &mut Self
1st row affine transform
fn srow_y(&mut self, value: [f32; 4]) -> &mut Self
2nd row affine transform
fn srow_z(&mut self, value: [f32; 4]) -> &mut Self
3rd row affine transform
fn intent_name(&mut self, value: [u8; 16]) -> &mut Self
'name' or meaning of data
fn magic(&mut self, value: [u8; 4]) -> &mut Self
Magic code. Must be b"ni1\0"
or b"ni+\0"
fn build(&self) -> Result<NiftiHeader, String>
Trait Implementations
impl Default for NiftiHeaderBuilder
[src]
fn default() -> NiftiHeaderBuilder
Returns the "default value" for a type. Read more
impl Clone for NiftiHeaderBuilder
[src]
fn clone(&self) -> NiftiHeaderBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more