% clear all

addBrukerPaths;

% dirpath = uigetdir('e:\data\dcemri\upt\');
% dirpath = uigetdir('s:\grp\nmr\nmr\user\korinek\9_4T_2\vincenzo\cntr\schiz-vin-cntr.jk5\4\pdata\1\');
% dirpath = uigetdir('s:\grp\nmr\nmr\user\radovan\data\schiz-vin-cntr.km3\2\pdata\1\','Enter directory with the 2dseq file');
dirpath = uigetdir('./','Enter directory with the 2dseq file');
dseqpath=[dirpath '/2dseq'];
visupath=[dirpath '/visu_pars'];

% dirpath='e:\data\dcemri\upt\130313_metaphetamin_mice_perf\pl_pd11_13Mar13.iR1\13\';
% % recopath=[dirpath 'pdata\1\reco'];
% dseqpath=[dirpath 'pdata\1\2dseq'];
% visupath=[dirpath 'pdata\1\visu_pars'];
% % imdatapath = [dirpath 'pdata\1\'];

% 
% %% read k space data: (Radovan Jirik: worked well)
% direct_kdataObj=CKDataObject(dirpath(1:end-8));
% direct_kdataObj.viewer;
%  
% %% reconstruct images: (Radovan Jirik: didn't work)
% recopath=[dirpath '/reco'];
% direct_kdataObj=direct_kdataObj.readReco(recopath);
% direct_kdataObj.Filespath.path_to_2dseq = dseqpath;
% imageObj=direct_kdataObj.reco('all', 'image');


%% load separate reconstructed image:
obj=ImageDataObject(dseqpath, visupath);
% imageObj=ImageDataObject(dirpath); (Radovan Jirik: didn't work)

obj.viewer