예제 #1
0
 def set_reference_image(self, reference_image):
     """Set reference image."""
     if not isinstance(reference_image, SIRF.ImageData):
         raise AssertionError()
     self.reference_image = reference_image
     parms.set_parameter(self.handle, self.name, 'reference_image',
                         reference_image.handle)
예제 #2
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_reference_image(self, reference_image):
     """Set reference image. This is the image that would be the reference if you were doing a forward transformation."""
     if not isinstance(reference_image, SIRF.ImageData):
         raise AssertionError()
     self.reference_image = reference_image
     parms.set_parameter(self.handle, self.name, 'reference_image', reference_image.handle)
예제 #3
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_initial_affine_transformation(self, src):
     """Set initial affine transformation."""
     if not isinstance(src, AffineTransformation):
         raise AssertionError()
     parms.set_parameter(self.handle, self.name, 'initial_affine_transformation', src.handle)
예제 #4
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_max(self):
     """Get max."""
     return parms.float_par(self.handle, 'NiftiImageData', 'max')
예제 #5
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_output(self):
     """Get output."""
     image = NiftiImageData()
     image.handle = parms.parameter_handle(self.handle, self.name, 'output')
     check_status(image.handle)
     return image
예제 #6
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_padding_value(self, val):
     """Set padding value."""
     parms.set_float_par(self.handle, self.name, 'padding', val)
예제 #7
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_interpolation_type_to_cubic_spline(self):
     """Set interpolation type to cubic spline."""
     parms.set_int_par(self.handle, self.name, 'interpolation_type', 3)
예제 #8
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_interpolation_type_to_nearest_neighbour(self):
     """Set interpolation type to nearest neighbour."""
     parms.set_int_par(self.handle, self.name, 'interpolation_type', 0)
예제 #9
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_floating_image(self, floating_image):
     """Sets the floating image."""
     if not isinstance(floating_image, SIRF.ImageData):
         raise AssertionError()
     parms.set_parameter(self.handle, 'Registration', 'floating_image', floating_image.handle)
예제 #10
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_parameter_file(self, filename):
     """Sets the parameter filename."""
     parms.set_char_par(self.handle, 'Registration', 'parameter_file', filename)
예제 #11
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_contains_nans(self):
     """Returns true if image contains any voxels with NaNs."""
     return parms.bool_par(self.handle, 'NiftiImageData', 'contains_nans')
예제 #12
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_sum(self):
     """Get sum."""
     return parms.float_par(self.handle, 'NiftiImageData', 'sum')
예제 #13
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_standard_deviation(self):
     """Get standard deviation."""
     return parms.float_par(self.handle, 'NiftiImageData', 'std')
예제 #14
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_variance(self):
     """Get variance."""
     return parms.float_par(self.handle, 'NiftiImageData', 'variance')
예제 #15
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_mean(self):
     """Get mean."""
     return parms.float_par(self.handle, 'NiftiImageData', 'mean')
예제 #16
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_floating_image(self, floating_image):
     """Set floating image. This is the image that would be the floating if you were doing a forward transformation."""
     if not isinstance(floating_image, SIRF.ImageData):
         raise AssertionError()
     self.floating_image = floating_image
     parms.set_parameter(self.handle, self.name, 'floating_image', floating_image.handle)
예제 #17
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_interpolation_type(self, interp_type):
     """Set interpolation type. 0=nearest neighbour, 1=linear, 3=cubic, 4=sinc."""
     if not isinstance(interp_type, int):
         raise AssertionError()
     parms.set_int_par(self.handle, self.name, 'interpolation_type', interp_type)
예제 #18
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_reference_mask(self, reference_mask):
     """Sets the reference mask."""
     if not isinstance(reference_mask, SIRF.ImageData):
         raise AssertionError()
     parms.set_parameter(self.handle, 'Registration', 'reference_mask', reference_mask.handle)
예제 #19
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_interpolation_type_to_linear(self):
     """Set interpolation type to linear."""
     parms.set_int_par(self.handle, self.name, 'interpolation_type', 1)
예제 #20
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_floating_mask(self, floating_mask):
     """Sets the floating mask."""
     if not isinstance(floating_mask, SIRF.ImageData):
         raise AssertionError()
     parms.set_parameter(self.handle, 'Registration', 'floating_mask', floating_mask.handle)
예제 #21
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_interpolation_type_to_sinc(self):
     """Set interpolation type to sinc."""
     parms.set_int_par(self.handle, self.name, 'interpolation_type', 4)
예제 #22
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_output(self):
     """Gets the registered image."""
     output = self.reference_image.same_object()
     output.handle = parms.parameter_handle(self.handle, 'Registration', 'output')
     return output
예제 #23
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_output(self):
     """Get output."""
     image = self.reference_image.same_object()
     image.handle = parms.parameter_handle(self.handle, self.name, 'output')
     check_status(image.handle)
     return image
예제 #24
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_floating_time_point(self, floating_time_point):
     """Set floating time point."""
     parms.set_int_par(self.handle, self.name, 'floating_time_point', floating_time_point)
예제 #25
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def get_determinant(self):
     """Get determinant."""
     return parms.float_par(self.handle, self.name, 'determinant')
예제 #26
0
파일: Reg.py 프로젝트: KrisThielemans/SIRF
 def set_reference_time_point(self, reference_time_point):
     """Set reference time point."""
     parms.set_int_par(self.handle, self.name, 'reference_time_point', reference_time_point)