[IGSTK-Developers] PrintSelf

Hee-su Kim hkim at isis.imac.georgetown.edu
Wed Jun 1 21:08:14 EDT 2005


Hi David,

Thank you for your kind answer.

I worked with VC .NET 2003 and now have no problem.

I couldn't compile it with VC service pack 6. I don't know whether it's 
installed well or not.

I already committed codes but I'll have to check codes according to your 
suggestion.

Fortunately, there was nothing modified while I was committing them. (I 
checked each file with diff command one by one.)

Although I built IGSTK and Sandbox several times including tests after 
adding PrintSelf(), I'm still afraid of possible compilation error. There 
was an igstkViewTest error as the dashboard showed. It doesn't matter to me.

Thanks,
Hee-Su


----- Original Message ----- 
From: "David Gobbi" <dgobbi at atamai.com>
To: "Hee-su Kim" <hkim at isis.imac.georgetown.edu>
Cc: "IGSTK-developers" <igstk-developers at public.kitware.com>
Sent: Wednesday, June 01, 2005 5:34 PM
Subject: Re: [IGSTK-Developers] PrintSelf


> Hi Hee-su,
>
> I can tackle most of these questions.
>
> Hee-su Kim wrote:
>
>> Hi guys,
>> There are some issues on PrintSelf.
>> Some of igstk classes are derived from ITK but some are from VTK, or
>> not derived at all.
>> PrintSelf from ITK is a const method but not const in VTK.
>
> Classes derived from ITK must use a const PrintSelf, classes derived
> from VTK will have to use a non-const PrintSelf.
>
>> Classes that are not derived have to include all Print-related methods
>> and an operator<<.
>
> Classes that aren't derived from either ITK or VTK do not need a
> PrintSelf, since the requirement for PrintSelf is really a requirement
> that is "inherited" from ITK and VTK.
>
> These classes should define an operator<<() that prints some info that
> is useful for identifying the object.
>
>> There are containers as a member variable, should all elements in
>> containers be displayed?
>
> In general, no. But if the container will only ever contain a small
> number of elements (e.g. less than 10) then it might be useful to print
> them. It has to be a judgement call by whoever writes the class, but if
> you are ever uncertain, then don't print the all the elements.
>
> As an example, it would be useful for the PrintSelf of Tracker to print
> out all the ports and tools, since there are only a few of them.
>
>> I modified source codes for IGSTK but I couldn't compile some files
>> with VC6 owing to INTERNAL COMPILER ERRORS so I'm trying to build ITK
>> and VTK on .NET2003.
>
> Well, I know that VC6 won't compile VTK or ITK at all unless it has
> service pack 5 or higher installed. So if you aren't sure which vc6
> service pack you are using, go to www.microsoft.com, click "Downloads",
> and search for "Visual Studio 6.0 Service Pack 5."
>
>> I think this error is not related to syntax or linking..
>> C:\Insight2\Insight\Code\Common\itkFixedArray.h(63) : fatal error
>> C1001: INTERNAL COMPILER ERROR
>> (compiler file 'msc1.cpp', line 1794)
>> Please choose the Technical Support command on the Visual C++
>> Help menu, or open the Technical Support help file for more information
>
> Yes, the original vc6 was too buggy to handle ITK. The service pack
> should fix that.
>
>> Are merging properly done with CVS if I and other programmers are
>> trying to modify source codes concurrently?
>
> CVS does the merge when you update, not when you commit. So if you try
> to commit a file that someone else has modified, then cvs will refuse to
> allow you to commit the file until you do a cvs update. When you update,
> cvs will try to merge the other persons changes with your own changes,
> and the merge will be done to your local copy of the file and not to the
> copy in the repository. So you will end up with a local copy of the file
> that contains your changes as well as any changes made by other people
> since your previous update.
>
> After the update, you should test again to make sure things still work.
> You can also go to the "CVS" link from the IGSTK dashboard to see what
> changes the other person made to the file.
>
> If everything works after the merge, then you can commit your local copy
> of the file to the repository.
>
> Note that sometimes cvs can't do a merge. This happens when you and some
> other person have edited exactly the same line of code, for instance. In
> this case, cvs will tell you that a "conflict" has occurred and mark the
> conflicting parts of the file with ">>>", "===", and "<<<".
>
> - David
>
> 




More information about the IGSTK-Developers mailing list