[Insight-users] Re :  Fwd: Re : Need to correct this example
    John Drescher 
    drescherjm at gmail.com
       
    Tue Aug  4 17:40:45 EDT 2009
    
    
  
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
    
    
More information about the Insight-users
mailing list