[Vv] vv and clitk3 "coding standard"

David Sarrut David.Sarrut at creatis.insa-lyon.fr
Tue Apr 27 22:37:20 CEST 2010


excellent ! ok for me ...

however, another potential issue : I cannot read anymore a 4D image, it
crashes ... only for me ? any idea ?

log :
ERROR: In
/home/dsarrut/src/vtk/vtk-5.4.2/Filtering/vtkDemandDrivenPipeline.cxx, line
828
vtkStreamingDemandDrivenPipeline (0x1ed2c70): Input for connection index 0
on input port index 1 for algorithm vtkImageReslice(0x1d990c0) is of type
vtkImageData, but a vtkImageStencilData is required.

David

On Tue, Apr 27, 2010 at 20:17, Simon Rit <simon.rit at gmail.com> wrote:

> I added a coding style section on the wiki:
> http://www.creatis.insa-lyon.fr/rio/internalSoftware#Coding_style.
> Please review it and when we agree, we can do it... (before the
> release would be good).
>
> On Tue, Apr 27, 2010 at 10:42 AM, Joël Schaerer <joel.schaerer at gmail.com>
> wrote:
> > RTFM :)
> >
> > jschaerer at cepe:~/workspace/cvs/clitk3> astyle --help
> >
> >                            Artistic Style 1.23
> >                         Maintained by: Jim Pattee
> >                       Original Author: Tal Davidson
> >
> > Usage  :  astyle [options] Source1.cpp Source2.cpp  [...]
> >          astyle [options] < Original > Beautified
> >
> > When indenting a specific file, the resulting indented file RETAINS the
> > original file-name. The original pre-indented file is renamed, with a
> > suffix of ".orig" added to the original filename.
> >
> > Wildcards (* and ?) may be used in the filename.
> > A 'recursive' option can process directories recursively.
> >
> > By default, astyle is set up to indent C/C++/C#/Java files, with 4 spaces
> > per indent, a maximal indentation of 40 spaces inside continuous
> statements,
> > and NO formatting.
> >
> > Option's Format:
> > ----------------
> >    Long options (starting with '--') must be written one at a time.
> >    Short options (starting with '-') may be appended together.
> >    Thus, -bps4 is the same as -b -p -s4.
> >
> > Predefined Style Options:
> > -------------------------
> >    --style=allman  OR  --style=bsd  OR  -A1
> >    Allman style formatting/indenting.
> >    Broken brackets.
> >
> >    --style=java  OR  -A2
> >    Java style formatting/indenting.
> >    Attached brackets.
> >
> >
> > On 04/27/2010 10:38 AM, Simon Rit wrote:
> >> What is astyle?
> >>
> >> On Tue, Apr 27, 2010 at 10:37 AM, Joël Schaerer <
> joel.schaerer at gmail.com> wrote:
> >>
> >>> On 04/27/2010 10:32 AM, David Sarrut wrote:
> >>>
> >>> astyle ? ok can we do what has been proposed at once ?
> >>>
> >>> Yes, if everyone agrees. Note that astyle cannot do any of these:
> >>>
> >>>
> >>>
> >>>>> - all member functions start with an upper case (like vtk and itk,
> but
> >>>>> unlike QT !) : SetToto(a) and GetToto()
> >>>>>
> >>> - all member variables start with m, eg : mToto or mTiti (unlike vtk,
> unlike
> >>> qt, unlike itk)
> >>> - delimitate the function (in cxx and txx) with comment like
> //------------
> >>> (see for example clitkBinarizeImageGenericFilter.txx)
> >>>
> >>>
> >>>
> >>>
> >>> On Tue, Apr 27, 2010 at 10:30, Joël Schaerer <joel.schaerer at gmail.com>
> >>> wrote:
> >>>
> >>>> I don't really have a preference, but I suggest that we change all the
> >>>> sources at once with astyle once we converge on a standard. Of course
> >>>> using the default astyle layout would be the simplest :)
> >>>>
> >>>> On a completely unrelated topic, if you use vv a lot from the command
> >>>> line, I suggest adding the following line to your .bashrc:
> >>>>
> >>>> complete -A file -X '*.raw' vv
> >>>>
> >>>> It makes dealing with mhd files a lot more pleasant.
> >>>>
> >>>> joel
> >>>>
> >>>> On 04/27/2010 09:36 AM, Simon Rit wrote:
> >>>>
> >>>>> After working a bit on clitk3, I have the feeling that there is
> >>>>> absolutely no consistency between (and even within) files. I don't
> >>>>> really think we should adopt a coding standard because we should keep
> >>>>> our own coding styles but it would be nice if we could just set a
> >>>>> minimal set of rules for the sake of readability. I suggest these
> ones
> >>>>> first:
> >>>>> - indentation: 2 spaces
> >>>>> - tabs are replaced by spaces
> >>>>> - opening and closing characters of a block are aligned vertically,
> e.g.
> >>>>> if (true)
> >>>>> {
> >>>>> }
> >>>>> - types are suffixed with Type (as in ITK if I'm not mistaking)
> >>>>> - preprocessor defines and macros in upper case
> >>>>>
> >>>>> For the rest (e.g. naming of functions and variables), we can try to
> >>>>> follow the rules of our third-party libraries (itk and vtk). What do
> >>>>> you think?
> >>>>> Simon
> >>>>> _______________________________________________
> >>>>> vv mailing list
> >>>>> vv at creatis.insa-lyon.fr
> >>>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> Joël Schaerer, PhD
> >>>> Research Engineer
> >>>>
> >>>> Centre de lutte contre le cancer Léon Bérard
> >>>> Service de radiothérapie
> >>>> 28 rue Laënnec
> >>>> 69373 LYON CEDEX 08
> >>>>
> >>>> Tel: 04 78 78 51 50
> >>>>     06 26 65 29 54
> >>>>
> >>>> http://www.creatis.insa-lyon.fr/rio
> >>>> http://www.creatis.insa-lyon.fr/rio/vv
> >>>>
> >>>> _______________________________________________
> >>>> vv mailing list
> >>>> vv at creatis.insa-lyon.fr
> >>>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> >>>>
> >>>
> >>>
> >>> --
> >>> David Sarrut, Phd
> >>> Chargé de recherche CNRS
> >>> Centre de lutte contre le cancer Léon Bérard
> >>> 28 rue Laënnec, 69373 Lyon cedex 08
> >>> Laboratoire CREATIS-LRMN UMR CNRS 5220, Inserm U 630
> >>> Tel : 04 78 78 51 51 / 06 74 72 05 42
> >>> http://www.creatis.insa-lyon.fr/rio
> >>> ______________________________________________
> >>> "2 + 2 = 5,  for extremely large values of 2"
> >>> ______________________________________________
> >>>
> >>> _______________________________________________
> >>> vv mailing list
> >>> vv at creatis.insa-lyon.fr
> >>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> >>>
> >>>
> >>> --
> >>> Joël Schaerer, PhD
> >>> Research Engineer
> >>>
> >>> Centre de lutte contre le cancer Léon Bérard
> >>> Service de radiothérapie
> >>> 28 rue Laënnec
> >>> 69373 LYON CEDEX 08
> >>>
> >>> Tel: 04 78 78 51 50
> >>>      06 26 65 29 54
> >>>
> >>> http://www.creatis.insa-lyon.fr/rio
> >>> http://www.creatis.insa-lyon.fr/rio/vv
> >>>
> >>> _______________________________________________
> >>> vv mailing list
> >>> vv at creatis.insa-lyon.fr
> >>> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> >>>
> >>>
> >>>
> >> _______________________________________________
> >> vv mailing list
> >> vv at creatis.insa-lyon.fr
> >> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> >>
> >
> >
> > --
> > Joël Schaerer, PhD
> > Research Engineer
> >
> > Centre de lutte contre le cancer Léon Bérard
> > Service de radiothérapie
> > 28 rue Laënnec
> > 69373 LYON CEDEX 08
> >
> > Tel: 04 78 78 51 50
> >     06 26 65 29 54
> >
> > http://www.creatis.insa-lyon.fr/rio
> > http://www.creatis.insa-lyon.fr/rio/vv
> >
> > _______________________________________________
> > vv mailing list
> > vv at creatis.insa-lyon.fr
> > http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
> >
> _______________________________________________
> vv mailing list
> vv at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/vv
>



-- 
David Sarrut, Phd
Chargé de recherche CNRS
Centre de lutte contre le cancer Léon Bérard
28 rue Laënnec, 69373 Lyon cedex 08
Laboratoire CREATIS-LRMN UMR CNRS 5220, Inserm U 630
Tel : 04 78 78 51 51 / 06 74 72 05 42
http://www.creatis.insa-lyon.fr/rio
______________________________________________
"2 + 2 = 5,  for extremely large values of 2"
______________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20100427/07881393/attachment.html>


More information about the vv mailing list