importconverter "process by" behaviour

  • Hi, I'm trying to setup a serverless system, that should just store the data on disk, and run a script (actually a .bat under windows) that does some things (make directories etc) and than convert DICOMS into a given format (NIFTI). This script should be run after each series has been completely transferred.


    Now, I have 2 problems.


    1st, and more serious: if I use the syntax:


    ImportConverter0 = system "@start C:\dcm2nii\convertdcm.bat %P > nul"


    The script in itself works correctly, however it is triggered before the end of each series transmission (apparently before each slice): useless.


    If I use the syntax


    process series by command "@start C:\dcm2nii\convertdcm.bat %P > nul"


    the very same script does not work at all (apparently, it is not started appropriately). Any hints? Which event actually triggers the "proces series" importconverter? are there any other suggested ways to impement this function?


    2nd point is related to making the system reliable: eg is it possible to terminate the invoked process after a given time, if not completed?


    Best, Federico

  • Dear Marcel,


    thank you for your fast reply. unfortunately, it doesn't work. Even if I set very simple commands like:


    ImportConverter0 = process series after 1 by "echo %P > c:\temp\temp.txt" noting happens (I waited well more than 1 minute). Possibly I'm missing something basilar?


    best, Federico

  • Hi, after tweaking a bit, it indeed worked also by directly calling a batch file. I think the problem was the commandline length. Perhaps there is a 254 chars limit? Best, Federico

  • Hi, sorry for the late reply. After some testing, I think that the problem is related to the parser, not to the command line length. In particular, these converters work:
    ExportConverter0 = process series after 120 by C:\dcm2nii\cvdcm.bat %P>nul
    ExportConverter0 = process series after 120 by cmd /C C:\dcm2nii\cvdcm.bat %P>nul


    But this does not work:


    ExportConverter0 = process series after 120 by "C:\dcm2nii\cvdcm.bat %P>nul"


    best, Federico

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!