[Insight-users] [Patch] Checker pattern size
Luis Ibanez
luis.ibanez at kitware.com
Mon May 23 19:00:59 EDT 2005
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
More information about the Insight-users
mailing list