@@ -186,7 +186,8 @@ =head1 AUTHORS
186186my $tarchiveLibraryDir = $configOB -> getTarchiveLibraryDir();
187187my $mail_user = $configOB -> getMailUser();
188188my $is_qsub = $configOB -> getIsQsub();
189-
189+ my $converter = $configOB -> getConverter();
190+ my $bin_dirPath = $configOB -> getMriCodePath();
190191
191192
192193# define project space
@@ -237,14 +238,25 @@ =head1 AUTHORS
237238 # # this is where the subprocesses are created...
238239 # # should basically run processor script with study directory as argument.
239240 # # processor will do all the real magic
240-
241241 my $tarchive_path = " $tarchiveLibraryDir /$tarchive " ;
242- my $command = sprintf (
243- " tarchiveLoader.pl -profile %s -uploadID %s %s " ,
244- $profile ,
245- quotemeta ($upload_id ),
246- quotemeta ($tarchive_path )
247- );
242+ my $command ;
243+ if ($converter =~ m / dcm2mnc/ i ) {
244+ $command = sprintf (
245+ " tarchiveLoader.pl -profile %s -uploadID %s %s " ,
246+ $profile ,
247+ quotemeta ($upload_id ),
248+ quotemeta ($tarchive_path )
249+ );
250+ } elsif ($converter =~ m / dcm2niix/ i ) {
251+ my $python_config = $configOB -> getPythonConfigFile();
252+ $command = sprintf (
253+ " %s /python/run_dicom_archive_loader.py -p %s -t %s " ,
254+ quotemeta ($bin_dirPath ),
255+ $python_config ,
256+ quotemeta ($tarchive_path )
257+ );
258+ }
259+
248260 # #if qsub is enabled use it
249261 if ($is_qsub ) {
250262 open QSUB, " | qsub -V -e $stderr -o $stdout -N process_tarchive_${counter} " ;
0 commit comments