[Insight-developers] Developer's Guide - Write A Filter
Will Schroeder
will.schroeder@kitware.com
Sat, 29 Sep 2001 08:25:38 -0400
Hi Luis-
Thank you so much for looking this over.
At 07:43 AM 9/29/2001 -0400, Luis Ibanez wrote:
>1) In "overview of filter creation" it says that GenerateData()
> has to allocate memory for the output, while ThreadedGenerateData()
> should not. Is that right ?
> I thought that the streaming mechanism was doing the allocations
> before calling GenerateData()... (I'm not allocating memory in
> most of the filters...maybe we just found a bug :-) )
If ThreadedGenerateData() is implemented by the filter writer (and not
GenerateData()), then the default implementation of GenerateData()
allocates memory, and then invokes the filter's ThreadedGenerateData(). If
you have written a GenerateData() without memory allocation, then that
needs to be fixed.
>2) I added some figures from a tutorial we have here, they illustrate
> the pipeline connections (ProcesObject/DataObject), and a UML
> sequence diagram of the updating mechanism. The original figures
> were done with xfig, and exported as eps.
>
> Probably we will have to modify these figures to better fit the
> text.
Thanks, I assume these figures are checked in.
>3) I would like to add some UML class diagrams to make clearer what
> the options are when selecting the base class for a filter. This
> is discussed in "Overview of Filter creation". In particular
> showing the method that the developer will have to override.
Okay.
>4) A UML sequence diagram could also be helpful for describing the
> update negotiation at the DataObject level.
>
>5) It could probably be good to add a table (or some kind of symbol
> in the text) to indicate what methods are expected to be overrided
> by the user and what methods are provided by the system.
> The discussion on the updating mechanism is nicely detailed, but
> I guess that the developer reading it will have in mind the
> question: "what do I have to rewrite ?"
We can create a table, good idea.
>6) It was great to add the description of the relation between
> Multithreading and the Events. I finally understood why the
> multithreaded filters are keeping track of the thread id
> before invoking events.
Simultaneous IO from threads is bad.
>7) A description of the Command/Observers/Event mechanism seem
> to be necesary. Would you prefer to make of this a separte
> chapter ?
> We have a couple of diagrams on this too.
I think that this belongs in the UsersGuide. Let's revisit the organization
of the guides next week and make sure they still make sense.
>Document style
>
>1) The formating is now using the InsightDocument style, and we have
> the decoration lines from fancyhdr.sty :)
If this doesn't do the trick, I'm going to reinstall my MikTex. I found
that it does have those style files, but only if you do the full
installation, which is a huge monster to download.
>2) fancyhdr.sty and floatflt.sty were checked in under
> InsightDocumens/Latex
>
>3) would you like to use a different font (maybe courier) for class
> names and method names cited in the text ?
> we have some macros that can facilitate that.
I have done this in the past (in some books I have helped write). The
feedback I've received is that all the font changes are very hard on the
eye. So I look to use difference clues to indicate what's a method
(trailing () like Modified()) and class names (leading itk::ClassNameHere).
>4) we are including the itk logo in each documen, so the itkLogo.jpg
> file is repeated in different directories. Should we arrange a
> central directory for graphic files ? like is done in
> Insight/Documentation/Art ?
I think that's the right place Luis. Can you create the directory and put
the file in there?
Thanks,
Will