]> Creatis software - clitk.git/blob - itk/clitkBoundingBoxUtils.h
Moved from repository clitk to clitk.private/tests_dav
[clitk.git] / itk / clitkBoundingBoxUtils.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 CLITKBOUNDINGBOXUTILS_H
20 #define CLITKBOUNDINGBOXUTILS_H
21
22 // clitk
23 #include "clitkCommon.h"
24
25 // itk
26 #include <itkBoundingBox.h>
27
28 namespace clitk {
29
30   //--------------------------------------------------------------------
31   template<class ImageType>
32   void ComputeBBFromImageRegion(const ImageType * image, 
33                                 typename ImageType::RegionType region,
34                                 typename itk::BoundingBox<unsigned long, 
35                                                           ImageType::ImageDimension>::Pointer bb);
36   
37   //--------------------------------------------------------------------
38   template<int Dimension>
39   void ComputeBBIntersection(typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbo, 
40                              typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi1, 
41                              typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi2);
42
43   //--------------------------------------------------------------------
44   template<int Dimension>
45   void ComputeBBIntersection(typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbo, 
46                              typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi1, 
47                              typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi2, 
48                              int dimension);
49
50   //--------------------------------------------------------------------
51   template<int Dimension>
52   void ComputeBBUnion(typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbo, 
53                       typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi1, 
54                       typename itk::BoundingBox<unsigned long, Dimension>::Pointer bbi2);
55   
56   //--------------------------------------------------------------------
57   template<class ImageType>
58   void ComputeRegionFromBB(const ImageType * image, 
59                            const typename itk::BoundingBox<unsigned long, 
60                                                            ImageType::ImageDimension>::Pointer bb, 
61                            typename ImageType::RegionType & region);
62
63 } // end clitk namespace
64
65 #include "clitkBoundingBoxUtils.txx"
66
67 #endif