]> Creatis software - clitk.git/commitdiff
COMP: itk4 compatibility
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 11 May 2012 13:09:28 +0000 (15:09 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 11 May 2012 13:09:28 +0000 (15:09 +0200)
segmentation/clitkMotionMaskGenericFilter.txx

index 992b6b8b09229ff8008cda620548a00e7724d15f..81efeccff173e19131e5c6057f4b2a3bcccd4214 100644 (file)
@@ -532,7 +532,11 @@ MotionMaskGenericFilter::InitializeEllips( typename itk::Vector<double,Dimension
       
 
       // try to guess ideal ellipse axes from the lungs' bounding box
+#if ITK_VERSION_MAJOR >= 4
+      typename LabelType::RegionType lung_bbox = label->GetBoundingBox();
+#else
       typename LabelType::RegionType lung_bbox = label->GetRegion();
+#endif
       axes[0] = 0.95*lung_bbox.GetSize()[0]*spacing[0]/2;
       axes[1] = 0.3*lung_bbox.GetSize()[1]*spacing[1]/2;
       axes[2] = 0.95*lung_bbox.GetSize()[2]*spacing[2]/2;