Sort DICOM files in a directory - DICOM

This is a discussion on Sort DICOM files in a directory - DICOM ; Dicomworks has a nice tool that allows you "clean up" a directory with a lot of dicom files by moving the files to sub-directories sorted by patient id, modality, study id, etc. It's under Tools|Clean up DICOM directory. Unfortunately, it ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Sort DICOM files in a directory

  1. Sort DICOM files in a directory

    Dicomworks has a nice tool that allows you "clean up" a directory with
    a lot of dicom files by moving the files to sub-directories sorted by
    patient id, modality, study id, etc. It's under Tools|Clean up DICOM
    directory.

    Unfortunately, it has GUI interface and I need to run it on a set of
    about 100 directories. Does anyone know of a command line tool that
    can perform a similar function?

    Please respond to the group since I use the google groups interface to
    access group messages.

    Thanks in advance.

    Bob

  2. Re: Sort DICOM files in a directory

    Dear Bob,

    this task can be done with an automation script (e.g. VBscript) based
    on PowerDicom http://www.dicom-solutions.com/powerdicom.shtm.

    Greetings

    Marianne

  3. Re: Sort DICOM files in a directory

    Bob Alvarez wrote:
    > Dicomworks has a nice tool that allows you "clean up" a directory with
    > a lot of dicom files by moving the files to sub-directories sorted by
    > patient id, modality, study id, etc. It's under Tools|Clean up DICOM
    > directory.
    >
    > Unfortunately, it has GUI interface and I need to run it on a set of
    > about 100 directories. Does anyone know of a command line tool that
    > can perform a similar function?


    gdcm has a 'SplitIntoDirectories' line command pgd that does the job.

    http://www.creatis.univ-lyon1.fr/Public/Gdcm

    Jean-Pierre Roux


    >
    > Please respond to the group since I use the google groups interface to
    > access group messages.
    >
    > Thanks in advance.
    >
    > Bob


  4. Re: Sort DICOM files in a directory

    > Bob Alvarez wrote:
    > > Dicomworks has a nice tool that allows you "clean up" a directory with
    > > a lot of dicom files by moving the files to sub-directories sorted by
    > > patient id, modality, study id, etc. It's under Tools|Clean up DICOM
    > > directory.

    >
    > > Unfortunately, it has GUI interface and I need to run it on a set of
    > > about 100 directories. Does anyone know of a command line tool that
    > > can perform a similar function?


    The dicom3tools utilities has a bunch of Unix shell scripts that do
    this sort of thing.

    For example "dcmvhier.datedesc", "dcmvhier.8only" and "dcmvhier.uid".

    These are used with a "find" command or with "xargs". E.g., if the old
    files are in "old"
    and you want the new files in "new", then:

    mkdir new
    (cd new; find ../old -type f -exec dcmvhier.datedesc '{}' ';')

    If you don't like the folder naming convention, it should be obvious
    from the source of
    these scripts how to create something different yourself.

    David

  5. Re: Sort DICOM files in a directory

    >>>>> "Bob" == Bob Alvarez writes:

    > Unfortunately, it has GUI interface and I need to run it on
    > a set of about 100 directories. Does anyone know of a
    > command line tool that can perform a similar function?


    medcon comes with some scripts showing how to do that.
    xmedcon.sourceforge.net

    Mike

  6. Re: Sort DICOM files in a directory

    Thanks for the replies. I will follow them up.

    Bob

+ Reply to Thread