Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 1.59 KB

03-ProcessingRegistration.md

File metadata and controls

53 lines (46 loc) · 1.59 KB

Image Processing and Registration tools

Medical Image Processing

Registration

Resampling

  • Andrew's resample_images_v3.m
    • Source: /home/sf269365/ZTE/scripts/resample_images_v3.m
% function resampled = resample_images_v3(fixed,moving,interp_method,extrapval)
%% Resample image from one image dimension to another
% Requirements: GE PET toolbox, GetTransformMatrix()
%
%
% Notes: if input is oblique and the dicom header is read by GEread3DDicom, 
% replace ImagePositionPatient with the proper values by reading in 
% ImagePositionPatient from the first slice of the Dicom data
% 
% This code assumes a feet-to-head slice ordering
%
% Inputs:
%       fixed - target image space (in struct generated by
%       GEread3DDicom)
%       moving - image data to resample (in struct generated by
%       GEread3DDicom)
%       interp_method - type of interpolation
%           Options: 'linear','nearest','cubic'
%       extrapval - extrapval for interp3
%
% Outputs:
%       resampled - resampled image with physical dimensions and
%       coordinates of fixed image
%
% Andrew Leynes, July 29, 2016
% Andrew Leynes, Aug. 9, 2016 - updated to use interp3