<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 &lt;unsigned int Dimension&gt;<br>
void DemonsRegistrationFunction( arguments args )<br>
{<br>
&nbsp; // Declare the types of the images (float or double only)<br>
&nbsp; typedef float&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PixelType;<br>
&nbsp; typedef itk::Image&lt;PixelType, Dimension&gt; ImageType;<br>
<br>
&nbsp; typedef itk::Vector&lt;PixelType, Dimension&gt; VectorPixelType;<br>
&nbsp; typedef typename itk::Image<br>
&nbsp; &lt;VectorPixelType, Dimension&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DeformationFieldType;<br>
<br>
&nbsp; // Images we use<br>
&nbsp; typename ImageType::Pointer fixedImage = 0;<br>
&nbsp; typename ImageType::Pointer movingImage = 0; <br>
&nbsp; typename DeformationFieldType::Pointer inputDefField = 0;<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp; // Set up the file readers<br>
&nbsp; typedef itk::ImageSeriesReader&lt;ImageType&gt; ImageReaderSeriesType; //for the Image Dicom files<br>
&nbsp;&nbsp; typedef itk::ImageFileReader&lt;DeformationFieldType&gt; FieldReaderType;<br>
&nbsp; typedef itk::TransformFileReader&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TransformReaderType;<br>
<br>
&nbsp; typedef itk::GDCMImageIO ImageIOType;<br>
&nbsp; typedef itk::GDCMSeriesFileNames NamesGeneratorType;<br>
&nbsp;<br>
&nbsp; typedef itk::MetaImageIO ImageIOOutputType;<br>
<br>
&nbsp;&nbsp;&nbsp; { // for mem allocations<br>
&nbsp;&nbsp;&nbsp; typename ImageIOType::Pointer GDCMImageIO = ImageIOType::New();<br>
&nbsp;&nbsp;&nbsp; typename NamesGeneratorType::Pointer NamesGenerator = NamesGeneratorType::New();<br>
&nbsp;&nbsp;&nbsp; NamesGenerator-&gt;SetInputDirectory(args.fixedImageFile.c_str());<br>
<br>
&nbsp;&nbsp;&nbsp; std::cout&lt;&lt; args.fixedImageFile.c_str() &lt;&lt; std::endl;<br>
<br>
&nbsp;&nbsp;&nbsp; typename const ImageReaderSeriesType::FileNamesContainer &amp; FixedImageFileNames = NamesGenerator-&gt;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 &quot;typename&quot; is needed??</span></i></p>
<p class="MsoNormal"><span style="color:black"><br>
</span></p>
<p class="MsoNormal"><span style="color:black">&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; &quot;Number of Dicom Files&quot; &lt;&lt; FixedImageFileNames.size() &lt;&lt;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">&nbsp;</p>
<p class="MsoNormal">Wei</p>
</div>
</div>
</div>
</div>
</body>
</html>