]> Creatis software - clitk.git/blob - itk/clitkBoundingBoxUtils.h
motion masks with and without bands
[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 ComputeBBUnion(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   
49   //--------------------------------------------------------------------
50   template<class ImageType>
51   void ComputeRegionFromBB(const ImageType * image, 
52                            const typename itk::BoundingBox<unsigned long, 
53                                                            ImageType::ImageDimension>::Pointer bb, 
54                            typename ImageType::RegionType & region);
55
56 } // end clitk namespace
57
58 #include "clitkBoundingBoxUtils.txx"
59
60 #endif