<DIV>Hello,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I build a new filter like this:</DIV>
<DIV>template &lt;class TInputImage, class TCriteriaImage&gt; class ITK_EXPORT MyFilter : public &lt;TInputImage, Image &lt;unsigned short,::itk::GetImageDimension&lt;TInputImage&gt;::ImageDimension&gt;&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Inside this filter I would like to create a vector which lengh is TCriteriaImage depth ? to do this I try this:</DIV>
<DIV>in my .h</DIV>
<DIV>typedef TCriteriaImage CriteriaImageType;</DIV>
<DIV>typedef CriteriaImageType::SizeType CriteriaISizeType;</DIV>
<DIV>&nbsp;</DIV>
<DIV>in my .txx</DIV>
<DIV>&nbsp;</DIV>
<DIV>CriteriaSizeType CriteriaSize=m_Criteria-&gt;GetRequestedRegion().GetSize();</DIV>
<DIV>unsigned int Nbcriteria=CriteriaSize[CriteriaDimension-1];</DIV>
<DIV>=&gt; which give the depth of the criteria Image, but next line does not compile</DIV>
<DIV>&nbsp;</DIV>
<DIV>typedef itk::Vector&lt;CriteriaImagePixelType, NbCriteria&gt;&nbsp; MeasurementVectorType;</DIV>
<DIV>=&gt;&nbsp; error: non-constant</DIV>
<DIV>&nbsp;</DIV>
<DIV>So, how can I access to the CriteriaImage Size to instantiate my vector with the depth of criteria inside my filter.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks again for help,</DIV>
<DIV>Lagaffe</DIV><p>
                <hr size=1> 
Découvrez le nouveau Yahoo! Mail : <font color="red">250 Mo d'espace</font> de stockage pour vos mails !<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/evt=25917/*http://fr.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_250/default/*http://fr.promotions.yahoo.com/mail/creer28.html">Créez votre Yahoo! Mail</a>