[Insight-users] itk::vector init with image depth?

Lagaffe lagaffe74130 at yahoo.fr
Thu Jan 13 03:01:17 EST 2005


Hello,
 
I build a new filter like this:
template <class TInputImage, class TCriteriaImage> class ITK_EXPORT MyFilter : public <TInputImage, Image <unsigned short,::itk::GetImageDimension<TInputImage>::ImageDimension>>
 
Inside this filter I would like to create a vector which lengh is TCriteriaImage depth ? to do this I try this:
in my .h
typedef TCriteriaImage CriteriaImageType;
typedef CriteriaImageType::SizeType CriteriaISizeType;
 
in my .txx
 
CriteriaSizeType CriteriaSize=m_Criteria->GetRequestedRegion().GetSize();
unsigned int Nbcriteria=CriteriaSize[CriteriaDimension-1];
=> which give the depth of the criteria Image, but next line does not compile
 
typedef itk::Vector<CriteriaImagePixelType, NbCriteria>  MeasurementVectorType;
=>  error: non-constant
 
So, how can I access to the CriteriaImage Size to instantiate my vector with the depth of criteria inside my filter.
 
Thanks again for help,
Lagaffe

		
---------------------------------
 Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050113/6699d017/attachment.htm


More information about the Insight-users mailing list