<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:SimSun}
@font-face
        {font-family:SimSun}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
@font-face
        {font-family:"\@SimSun"}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="EN-US" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Wei,
<br>
<br>
Please see my comment below.<br>
<br>
Wen<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF844762"><font color="#000000" face="Tahoma" size="2"><b>From:</b> insight-users-bounces@itk.org [insight-users-bounces@itk.org] on behalf of Liu,Wei [WLiu3@mdanderson.org]<br>
<b>Sent:</b> Tuesday, April 16, 2013 5:31 PM<br>
<b>To:</b> insight-users@itk.org<br>
<b>Subject:</b> [Insight-users] Series Read Dicom file using GDCMImageIO<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:black">I am trying to series read DICOM files as fixed image and moving image. I followed the examples in ITK 4.3.1/Example/IO/DicomSeriesReadSeriesWrite.cxx using GDCMImageIO.<br>
<br>
However, i always get the error when compiling:<br>
/work/01515/wliu3/LogSymmetricDemons-master/Applications/DemonsRegistration.cxx: In function ‘void DemonsRegistrationFunction(arguments)’:<br>
/work/01515/wliu3/LogSymmetricDemons-master/Applications/DemonsRegistration.cxx:681: error: too few template-parameter-lists<br>
/work/01515/wliu3/LogSymmetricDemons-master/Applications/DemonsRegistration.cxx:682: error: ‘FixedImageFileNames’ was not declared in this scope<br>
<br>
The following is the part of the code to series read the DICOM files:<br>
<br>
template <unsigned int Dimension><br>
void DemonsRegistrationFunction( arguments args )<br>
{<br>
// Declare the types of the images (float or double only)<br>
typedef float PixelType;<br>
typedef itk::Image<PixelType, Dimension> ImageType;<br>
<br>
typedef itk::Vector<PixelType, Dimension> VectorPixelType;<br>
typedef typename itk::Image<br>
<VectorPixelType, Dimension> DeformationFieldType;<br>
<br>
// Images we use<br>
typename ImageType::Pointer fixedImage = 0;<br>
typename ImageType::Pointer movingImage = 0; <br>
typename DeformationFieldType::Pointer inputDefField = 0;<br>
<br>
// Set up the file readers<br>
typedef itk::ImageSeriesReader<ImageType> ImageReaderSeriesType; //for the Image Dicom files<br>
typedef itk::ImageFileReader<DeformationFieldType> FieldReaderType;<br>
typedef itk::TransformFileReader TransformReaderType;<br>
<br>
typedef itk::GDCMImageIO ImageIOType;<br>
typedef itk::GDCMSeriesFileNames NamesGeneratorType;<br>
<br>
typedef itk::MetaImageIO ImageIOOutputType;<br>
<br>
{ // for mem allocations<br>
typename ImageIOType::Pointer GDCMImageIO = ImageIOType::New();<br>
typename NamesGeneratorType::Pointer NamesGenerator = NamesGeneratorType::New();<br>
NamesGenerator->SetInputDirectory(args.fixedImageFile.c_str());<br>
<br>
std::cout<< args.fixedImageFile.c_str() << std::endl;<br>
<br>
typename const ImageReaderSeriesType::FileNamesContainer & FixedImageFileNames = NamesGenerator->GetInputFileNames(); //problems happens here error: too few template-parameter-lists</span></p>
<p class="MsoNormal"><span style="color:black">--------------------------------------------------------------------------------------------------------------------------------</span></p>
<p class="MsoNormal"><i><span style="color:black">You sure "typename" is needed??</span></i></p>
<p class="MsoNormal"><span style="color:black"><br>
</span></p>
<p class="MsoNormal"><span style="color:black"> std::cout << "Number of Dicom Files" << FixedImageFileNames.size() <<std::endl;;<br>
<br>
</span></p>
<p class="MsoNormal">Does anybody know what is wrong here? </p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Wei</p>
</div>
</div>
</div>
</div>
</body>
</html>