[Insight-users] About ITK User Coding Styles

Sah Rayman sahrayman at yahoo.com
Thu, 19 Feb 2004 22:10:04 -0800 (PST)


Hi there,

ITK itself is very object oriented, well organized
code. But I just had some difficulty writing C++ style
code using ITK.

e.g., nearly all code examples has only one function,
main(); typedef some filters; link them together by
define input/output; and then update(). 

When the project gets larger, say, I need to use 20
filters (some of them are used more than once, like
BinaryThreshold), and need some operation in between
which can only be done by iterator, how can I write
it? 

Put everything in main() would make it really ugly.
One thing I can imagine is like the follows. But even
that is not very easy to do.

main() {
  Part1();
  Part2();
  //...
}

PartN() {
  //some filters goes here
  //... 
}

Just wonder how other people are doing. Any comments
or ideas are welcome.


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools