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 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);
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);
56 } // end clitk namespace
58 #include "clitkBoundingBoxUtils.txx"