<div dir="ltr"><div>I&#39;ve posted the cxx, txx and h-files associated with the program in question, to a gist:<br><br><a href="https://gist.github.com/anonymous/8302651">https://gist.github.com/anonymous/8302651</a><br><br>
</div>I&#39;m certain this is a fairly trivial error (I hope!), but any direction is much appreciated!<br><br>Thanks,<br><br>Tim<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 6, 2014 at 3:44 PM, Matt McCormick <span dir="ltr">&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tim,<br>
<br>
The error looks like it is related to const&#39;ness instead of SmartPointer from<br>
<br>
  &#39;itk::Vector&lt;T,<br>
<div class="im">NVectorDimension&gt;&#39; to &#39;const itk::Vector&lt;T,NVectorDimension&gt; &amp;&#39;<br>
<br>
</div>Hope this helps,<br>
Matt<br>
<div><div class="h5"><br>
On Mon, Jan 6, 2014 at 6:30 PM, Tim Bhatnagar &lt;<a href="mailto:tim.bhatnagar@gmail.com">tim.bhatnagar@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I am trying to build an Inverter for Deformation Fields that I gathered from<br>
&gt; source code at:<br>
&gt;<br>
&gt; <a href="http://www.insight-journal.com/browse/publication/768" target="_blank">http://www.insight-journal.com/browse/publication/768</a><br>
&gt;<br>
&gt; The error I&#39;m pasting below has something to do with using smartpointers, I<br>
&gt; believe, but if anyone can point to the change I need to make, I&#39;d be very<br>
&gt; appreciative. Thanks!<br>
&gt;<br>
&gt; I am getting the following error when compiling in Visual Studio Express<br>
&gt; 2010:<br>
&gt;<br>
&gt; C:/ITKrap/InsightToolkit-4.2.0/Modules/Core/Common/include\itkFixedPointInverseDeformationFieldImageFilter.txx(109):<br>
&gt; error C2664: &#39;itk::ImageRegionIterator&lt;TImage&gt;::Set&#39; : cannot convert<br>
&gt; parameter 1 from &#39;itk::Vector&lt;T,NVectorDimension&gt;&#39; to &#39;const<br>
&gt; itk::Vector&lt;T,NVectorDimension&gt; &amp;&#39;<br>
&gt;           with<br>
&gt;           [<br>
&gt;               TImage=itk::Image&lt;VectorPixelType,3&gt;<br>
&gt;           ]<br>
&gt;           and<br>
&gt;           [<br>
&gt;               T=double,<br>
&gt;               NVectorDimension=3<br>
&gt;           ]<br>
&gt;           and<br>
&gt;           [<br>
&gt;               T=float,<br>
&gt;               NVectorDimension=3<br>
&gt;           ]<br>
&gt;           Reason: cannot convert from &#39;itk::Vector&lt;T,NVectorDimension&gt;&#39; to<br>
&gt; &#39;const itk::Vector&lt;T,NVectorDimension&gt;&#39;<br>
&gt;           with<br>
&gt;           [<br>
&gt;               T=double,<br>
&gt;               NVectorDimension=3<br>
&gt;           ]<br>
&gt;           and<br>
&gt;           [<br>
&gt;               T=float,<br>
&gt;               NVectorDimension=3<br>
&gt;           ]<br>
&gt;           No user-defined-conversion operator available that can perform<br>
&gt; this conversion, or the operator cannot be called<br>
&gt;<br>
&gt; C:/ITKrap/InsightToolkit-4.2.0/Modules/Core/Common/include\itkFixedPointInverseDeformationFieldImageFilter.txx(51)<br>
&gt; : while compiling class template member function &#39;void<br>
&gt; itk::FixedPointInverseDeformationFieldImageFilter&lt;TInputImage,TOutputImage&gt;::GenerateData(void)&#39;<br>
&gt;           with<br>
&gt;           [<br>
&gt;               TInputImage=InputDFType,<br>
&gt;               TOutputImage=OutputDFType<br>
&gt;           ]<br>
&gt;<br>
&gt; C:\ITKrap\DiffeomorphicDemons-2009-06-Vercauteren-IJSource\InvertDeformationField.cxx(50)<br>
&gt; : see reference to class template instantiation<br>
&gt; &#39;itk::FixedPointInverseDeformationFieldImageFilter&lt;TInputImage,TOutputImage&gt;&#39;<br>
&gt; being compiled<br>
&gt;           with<br>
&gt;           [<br>
&gt;               TInputImage=InputDFType,<br>
&gt;               TOutputImage=OutputDFType<br>
&gt;           ]<br>
&gt;<br>
&gt; --<br>
&gt; Tim Bhatnagar<br>
&gt; PhD Candidate<br>
&gt; Orthopaedic Injury Biomechanics Group<br>
&gt; Department of Mechanical Engineering<br>
&gt; University of British Columbia<br>
&gt;<br>
&gt; Rm 5000 - 818 West 10th Ave.<br>
&gt; Vancouver, BC<br>
&gt; Canada<br>
&gt; V5Z 1M9<br>
&gt;<br>
&gt; Ph: (604) 675-8845<br>
&gt; Fax: (604) 675-8820<br>
&gt; Web: <a href="http://oibg.mech.ubc.ca" target="_blank">oibg.mech.ubc.ca</a><br>
&gt;<br>
&gt;<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Community mailing list<br>
&gt; <a href="mailto:Community@itk.org">Community@itk.org</a><br>
&gt; <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
&gt;<br>
</blockquote></div><br><br clear="all"><br>-- <br>Tim Bhatnagar<br>PhD Candidate<br>Orthopaedic Injury Biomechanics Group<br>Department of Mechanical Engineering<br>University of British Columbia<br><br>Rm 5000 - 818 West 10th Ave.<br>
Vancouver, BC<br>Canada<br>V5Z 1M9<br><br>Ph: (604) 675-8845<br>Fax: (604) 675-8820<br>Web: <a href="http://oibg.mech.ubc.ca" target="_blank">oibg.mech.ubc.ca</a><br>
</div>