function fetch_xform1

% created by Mark Smith 1/15/08
% code used with Shim Calculation GUI 
% This function created to accomodate current center re-alignment.

% Select and open transformation matrix for data set 1.
xform1=zeros(4,4);
[s1 s2]=uigetfile('*.mat','Select Transformation 1 .mat file');
set(findobj('tag','tx201'),'string',s1);
temp = struct2cell(open(strcat(s2,s1)));
xform1=temp{1};

% Apply transformation.
data1 = evalin('base','data1');
data1(:,4)=1;       % for transformation algorithm.

rdata1=zeros(length(data1),4);

for fc1=1:length(data1)
    rdata1(fc1,:)=(xform1*data1(fc1,:)')';
end

%assignin('base','xform1',xform1);
assignin('base','rdata1',rdata1);