]> Creatis software - clitk.git/blob - itk/clitkSegmentationUtils.h
some utilities for segmentation
[clitk.git] / itk / clitkSegmentationUtils.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17   ======================================================================-====*/
18
19 #ifndef CLITKSEGMENTATIONUTILS_H
20 #define CLITKSEGMENTATIONUTILS_H
21
22 #include "clitkCommon.h"
23 #include <itkBoundingBox.h>
24
25 namespace clitk {
26
27   //--------------------------------------------------------------------
28   template<class ImageType>
29   void ComputeBBFromImageRegion(typename ImageType::Pointer image, 
30                                 typename ImageType::RegionType region,
31                                 typename itk::BoundingBox<unsigned long, 
32                                 ImageType::ImageDimension>::Pointer bb);
33   
34   //--------------------------------------------------------------------
35   template<int Dimension>
36   void ComputeBBIntersection(typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbo, 
37                              typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi1, 
38                              typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi2);
39
40   //--------------------------------------------------------------------
41   template<class ImageType>
42   void ComputeRegionFromBB(typename ImageType::Pointer image, 
43                            const typename itk::BoundingBox<unsigned long, 
44                            ImageType::ImageDimension>::Pointer bb, 
45                            typename ImageType::RegionType & region);
46
47 }
48
49 #include "clitkSegmentationUtils.txx"
50
51 #endif