[Insight-users] GDCMSeriesFileNames Directory Format

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Dec 30 15:53:32 EST 2008


On Tue, Dec 30, 2008 at 9:37 PM, Marshall Strother <mcstrother at gmail.com> wrote:
> Hi.  I am trying to read in a series of sample DICOM images using the sample
> program in InsightToolkit-3.10.0/Examples/IO/DicomSeriesReadSeriesWrite.cxx
> but I am not sure of the proper format for the string in the
> GDCMSeriesFileNames SetInputDirectory method.
>
> With all of the code in the example the same, I would like to change the
> line:
>
> namesGenerator->SetInputDirectory( argv[1] )
>
> to a hard-coded directory, as in:
>
> namesGeneratory->SetInputDirector( "~/Images/Test Images/John Doe/8675309" )
>
> where the folder ~/Images/Test Images/John Doe/8675309/  contains the dicom
> series I want read in, but changing that line as I have above does not
> work.  (I am using a linux platform)  What is the proper format for this
> string?

Replace "~" by the value returned by "env $HOME", simply type that in
you shell. ~ is simply a shortcut you can use from the shell

-- 
Mathieu


More information about the Insight-users mailing list