Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSharedMorphologyUtilities.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSharedMorphologyUtilities.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-20 16:32:08 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkSharedMorphologyUtilities_h
00019 #define __itkSharedMorphologyUtilities_h
00020 
00021 #include <list>
00022 
00023 
00024 namespace itk {
00025 #if defined(_MSC_VER) && _MSC_VER >= 1300
00026 template <class TRegion, class TLine>
00027 bool NeedToDoFace(const TRegion AllImage,
00028                   const TRegion face,
00029                   const TLine line);
00030 
00031 template <class TImage, class TBres, class TLine>
00032 int ComputeStartEnd(const typename TImage::IndexType StartIndex,
00033                     const TLine line,
00034                     const float tol,
00035                     const typename TBres::OffsetArray LineOffsets,
00036                     const typename TImage::RegionType AllImage, 
00037                     unsigned &start,
00038                     unsigned &end);
00039 
00040 template <class TImage, class TBres, class TLine>
00041 int FillLineBuffer(typename TImage::ConstPointer input,
00042                    const typename TImage::IndexType StartIndex,
00043                    const TLine line,
00044                    const float tol,
00045                    const typename TBres::OffsetArray LineOffsets,
00046                    const typename TImage::RegionType AllImage, 
00047                    typename TImage::PixelType * inbuffer,
00048                    unsigned int &start,
00049                    unsigned int &end);
00050 
00051 template <class TImage, class TBres>
00052 void CopyLineToImage(const typename TImage::Pointer output,
00053                      const typename TImage::IndexType StartIndex,
00054                      const typename TBres::OffsetArray LineOffsets,
00055                      const typename TImage::PixelType * outbuffer,
00056                      const unsigned start,
00057                      const unsigned end);
00058 
00059 // This returns a face with a normal between +/- 45 degrees of the
00060 // line. The face is enlarged so that AllImage is entirely filled by
00061 // lines starting from every pixel in the face. This means that some
00062 // of the region will not touch the image. This approach is necessary
00063 // because we want to be able to sweep the lines in a fashion that
00064 // does not have overlap between them.
00065 template <class TInputImage, class TLine>
00066 typename TInputImage::RegionType
00067 MakeEnlargedFace(const TInputImage * input,
00068                const typename TInputImage::RegionType AllImage,
00069                const TLine line);
00070 
00071 // figure out the correction factor for length->pixel count based on
00072 // line angle
00073 template <class TLine>
00074 unsigned int GetLinePixels(const TLine line);
00075 #endif
00076 } // namespace itk
00077 
00078 #ifndef ITK_MANUAL_INSTANTIATION
00079 #include "itkSharedMorphologyUtilities.txx"
00080 #endif
00081 
00082 #endif
00083 

Generated at Thu May 28 11:37:41 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000