[Insight-users] Fwd: Re : Need to correct this example

Syrine Sahmim syrine.sahmim at yahoo.fr
Wed Aug 5 03:04:51 EDT 2009


Hi John,
I'm applying what you wrote to m e yesterday. Thank you really for helping me.
Have a nice day

Regards
Syrine




________________________________
De : John Drescher <drescherjm at gmail.com>
À : Syrine Sahmim <syrine.sahmim at yahoo.fr>
Cc : insight-users at itk.org
Envoyé le : Mardi, 4 Août 2009, 22h40mn 45s
Objet : Re: Re : [Insight-users] Fwd: Re : Need to correct this example

On Tue, Aug 4, 2009 at 5:30 PM, Syrine Sahmim<syrine.sahmim at yahoo.fr> wrote:
> Hi John,
> it's me again
> if i have a dicom series( a directory) how can i do to put it in command
> argument .i want to read the serie of 3D dicom
> i haven't just a file a have a directory
>

In the original code you posted in this thread.

nameGenerator->SetDirectory( argv[1] );

This line tells me that the first argument is a folder. If you have
spaces in the path use quotes.

Something like


"C:\Dicom\Images\Case1"

would be fine for the first argument. That is after you fix your code
to remove the following lines:

  argc = 2;
    argv[1] = "dicom";
    argv[2] = "dicomMRA.hdr";


Then you have to remember to pass the rest of the arguments.

In the following lines I believe you skipped argv[2]

  std::string seriesIdentifier;

    if( argc > 3 ) // If no optional series identifier
      {
      seriesIdentifier = argv[3];
      }
    else
      {
      seriesIdentifier = seriesUID.begin()->c_str();
      }

You probably want to remove this unless you store more than 1 series
in a folder and replace the above lines with just

   std::string seriesIdentifier;
   seriesIdentifier = seriesUID.begin()->c_str();


Then you used argv[3] and argv[4]

const double gaussianVariance = atof( argv[3] );
const unsigned int maxKernelWidth = atoi( argv[4] );

In this case you should probably change this to (if you got rid of
argv[3] in the step above for seriesIdentifier)

const double gaussianVariance = atof( argv[2] );
  const unsigned int maxKernelWidth = atoi( argv[3] );

I hope this gets you on the right track. This is all the time I have
for this at the moment.

John



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090805/3bd86976/attachment-0001.htm>


More information about the Insight-users mailing list