[Insight-users] CheckerBoardImageFilter : SetCheckerPattern() / GetCheckerPattern() methods.

Luis Ibanez luis.ibanez at kitware.com
Mon Jul 9 11:26:04 EDT 2007


Hi Emma,


These methods were added to ITK on May 25th 2005:
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkCheckerBoardImageFilter.h?rev=1.4&root=Insight&view=log


Please look at the Doxygen documentation of the CheckerBoardImageFilter.

You will find the methods:

GetCheckerPattern ()
http://public.kitware.com/Insight/Doxygen/html/classitk_1_1CheckerBoardImageFilter.html#itk_1_1CheckerBoardImageFilterz553_0

And

SetCheckerPattern ()
http://public.kitware.com/Insight/Doxygen/html/classitk_1_1CheckerBoardImageFilter.html#itk_1_1CheckerBoardImageFilterz553_1


You should use a type


              FilterType::PatternArrayType


as the argument to SetCheckerPattern()



Regards,


    Luis



==================================
On 7/9/07, Emma Ryan <eryanvtk at yahoo.com> wrote:
>
> Hi Luis,
>
>    Attached below is a copy of your email exchanges with Gavin Baker. He suggests some additions to the checkerboard
> generator. I would like to use these. Your reply states that they have been added to ITK, but I have the latest version of ITK
> and I am not able to use setCheckerPattern or getCheckerPattern.
>
> Do they go by a different name ?
>
> I checked the Inheritance diagram, but none of the functions came close.
>
> thanks in advance,
> Emma
>
>
> Hi Gavin,
>
> Thanks for pointing this out and for providing the patch to fix it.
>
> We committed your changes with a slight modification. Given that the
> checkerboard pattern can be specified using different number of
>  checkers
> along every dimension, we defined the Set()/Get() methods by using
> the ArrayType instead of a single scalar.
>
>
> The test for the filter was updated accordingly.
>
>
> Please update your CVS checkout and let us know if you find any
> other problem,
>
>
>
>      Thanks
>
>
>         Luis
>
>
>
> ------------------------
> Gavin Baker wrote:
>
> >* Hi,
> *>*
> *>* The itkCheckerBoardImageFilter will produce 4 boxes in each dimension,
> *>* regardless of the image size, and there is no way of changing this.
> *>*
> *>* Included below is a trivial patch to allow specifying the number of
> *>* checker boxes per dimension. The default behaviour is still the same,
> *>* and it has been tested and works fine.
> *>*
> *>* Thanks,
> *>*
> *>*   :: Gavin
> *>*
> *>*
> *>*
> *>*
>  ------------------------------------------------------------------------
> *>*
> *>* Index: itkCheckerBoardImageFilter.h
> *>* ===================================================================
> *>* RCS file: /cvsroot/Insight/Insight/Code/BasicFilters/itkCheckerBoardImageFilter.h,v
> *>* retrieving revision 1.2
> *>* diff -u -r1.2 itkCheckerBoardImageFilter.h
> *>* --- itkCheckerBoardImageFilter.h        2 May 2005 02:24:39 -0000       1.2
> *>* +++ itkCheckerBoardImageFilter.h        23 May 2005 05:38:02 -0000
> *>* @@ -71,7 +71,18 @@
> *>*
> *>*    /** Connect one of the operands for checker board */
> *>*    void SetInput2( const TImage * image2);
> *>* -
> *>* +
> *>* +  /** Specifies the number of checker boxes per dimension */
> *>* +  void SetCheckerPattern( unsigned int p )
> *>* +  {
> *>* +
>  m_CheckerPattern.Fill( p );
> *>* +  }
> *>* +
> *>* +  /** Specifies the number of checker boxes per dimension */
> *>* +  unsigned int GetCheckerPattern()
> *>* +  {
> *>* +    return m_CheckerPattern[0];
> *>* +  }
> *>*
> *>*  protected:
> *>*    CheckerBoardImageFilter();
> *>*
> *>*
> *>* ------------------------------------------------------------------------
> *>*
> *>* _______________________________________________
> *>* Insight-users mailing list
> *>* Insight-users at itk.org <http://www.itk.org/mailman/listinfo/insight-users>
> *>* http://www.itk.org/mailman/listinfo/insight-users*
>
>
>
> ------------------------------
> Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge
> <http://us.rd.yahoo.com/evt=47093/*http://tv.yahoo.com/collections/222>to
> see what's on, when.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070709/cb1ae00d/attachment-0001.html


More information about the Insight-users mailing list