<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Hi</div><div><br></div><div>This suggestion has the arguments backwards:</div><div><a href="http://en.cppreference.com/w/cpp/container/vector/vector">http://en.cppreference.com/w/cpp/container/vector/vector</a></div><div><br></div><div>This line creates an std::vector of Dimension size and fills it with the value of 8. </div><div><br></div><div>You can use the for loop to fill the array as suggested or use an array initializer if the array size is fixed.</div><div><br></div><div>HTH</div><div>Brad</div><div><br>On Aug 5, 2016, at 10:05 AM, Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Anton,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">I don't know C#'s syntax that well to give you direct translation, but here is another way to write the same C++ code which should be easier to translate:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default"><font face="monospace, monospace">std::vector<unsigned int> transfromDomainMeshSize;</font></div><div class="gmail_default"><font face="monospace, monospace">//C# eqivalent: unsigned int[] transfromDomainMeshSize;<br></font></div><div class="gmail_default"><font face="monospace, monospace">transfromDomainMeshSize.resize(8);</font></div><div class="gmail_default"><font face="monospace, monospace">//my stab in C#: transfromDomainMeshSize=new unsigned int[8];<br></font></div><div class="gmail_default"><font face="monospace, monospace">for (int i=0; i<8; i++)</font></div><div class="gmail_default"><font face="monospace, monospace"> transfromDomainMeshSize[i]=fixed.GetDimension();</font></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">HTH,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 5, 2016 at 9:40 AM, Anton Delehony <span dir="ltr"><<a href="mailto:anton.delehony@gmail.com" target="_blank">anton.delehony@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all, <br><br>I'm a new to C# and simple itk and have a very simple question.<br><br>in the ImageRegistrationMethodBSpline<wbr>1.cxx there is the line:<br><br>std::vector<unsigned int> transfromDomainMeshSize(fixed.<wbr>GetDimension(),8);<br><br>What is the equivlent line to this in C#?<br><br>thanks,<br><br>Anton<br></div>
<br>______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_____________________________________</span><br><span>Powered by <a href="http://www.kitware.com">www.kitware.com</a></span><br><span></span><br><span>Visit other Kitware open-source projects at</span><br><span><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br><span></span><br><span>Kitware offers ITK Training Courses, for more information visit:</span><br><span><a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a></span><br><span></span><br><span>Please keep messages on-topic and check the ITK FAQ at:</span><br><span><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br><span><a href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a></span><br></div></blockquote></body></html>