<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<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 &#8216;void DemonsRegistrationFunction(arguments)&#8217;:<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: &#8216;FixedImageFileNames&#8217; 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<br>
&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; &quot;Number of Dicom Files&quot; &lt;&lt; FixedImageFileNames.size() &lt;&lt;std::endl;;<br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal">Does anybody know what is wrong here? <o:p></o:p></p>
<p class="MsoNormal">Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Wei<o:p></o:p></p>
</div>
</body>
</html>