[Insight-developers] Depth of nested templates

Will Schroeder will.schroeder@kitware.com
Wed, 14 Mar 2001 15:42:18 -0500


Hi Folks-

Looking at the Voronoi class, I can't help but wonder why this is not a filter? It's a subclass of Mesh?? If it is to exist in the data processing pipeline, the algorithm should be separated from its input and output...algorithm should be an eventual subclass of  ProcessObject and the input and output should be subclasses of DataObject. (I'm not picking on Yinpeng, there are other classes that could be filters that are not.) 

I think that we are not thinking in pipeline fashion. I think that it is essential that the use and interface to classes is as uniform as possible.

Will



At 02:40 PM 3/14/2001 -0500, Yinpeng Jin wrote:
>As Brad told me, I have this too deep nested template problem in my code:
>
>typedef   itk::Point<int,2> EdgeInfo;
>std::vector< std::deque<EdgeInfo> > rawEdges;
>
>I don't know how far I can go. the first line should be fine since it is
>just an instantiation of itkPoint.
>can we go std::vector<EdgeInfo> or std::deque<EdgeInfo>?
>any suggestion on this?
>the problem is I have a list of polygon (size of the list is unkown), for
>each polygon there will be a list of EdgeInfo (again the size of those lists
>are unknow).
>
>what if I know the size of the polygon list as an nonconstant varible.
>are we allow to do this:
>
>typedef std::deque<EdgeInfo> EdgeInfoQ
>EdgeInfoQ *rawEdges = new EdgeInfoQ[knowSize];
>
>I remember somebody addressed this standard C++ "new" operation issue
>before, forgot the details.
>
>Yinpeng
>
>
>
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers