1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
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
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.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
19 #ifndef CLITKBOUNDINGBOXUTILS_H
20 #define CLITKBOUNDINGBOXUTILS_H
23 #include "clitkCommon.h"
26 #include <itkBoundingBox.h>
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);
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);
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,
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);
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);
63 } // end clitk namespace
65 #include "clitkBoundingBoxUtils.txx"