X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkSegmentationUtils.h;h=70388fe6cdb7380511bbda45373abd7f71a1200a;hb=0451c66d4a069d04db99c9d719e053c6019923d8;hp=7daf3c8345405463e12a47a459a5487da2847aa2;hpb=1c1a921431ce1b0d80279211bd3a12fa9c4ae7bd;p=clitk.git diff --git a/itk/clitkSegmentationUtils.h b/itk/clitkSegmentationUtils.h index 7daf3c8..70388fe 100644 --- a/itk/clitkSegmentationUtils.h +++ b/itk/clitkSegmentationUtils.h @@ -247,7 +247,7 @@ namespace clitk { typename ImageType::Pointer JoinSlices(std::vector::Pointer > & slices, - const ImageType * input, + const itk::ImageBase * input, //const ImageType * input, int direction) { typedef typename itk::Image SliceType; typedef itk::JoinSeriesImageFilter JoinSeriesFilterType; @@ -359,6 +359,14 @@ namespace clitk { void AndNot(ImageType * input, const ImageType * object, typename ImageType::PixelType BG=0); + template + void And(ImageType * input, + const ImageType * object, + typename ImageType::PixelType BG=0); + template + void Or(ImageType * input, + const ImageType * object, + typename ImageType::PixelType BG=0); //-------------------------------------------------------------------- @@ -411,6 +419,14 @@ namespace clitk { double margin, std::vector & A, std::vector & B); + template + void + SliceBySliceBuildLineSegmentAccordingToMinimalDistanceBetweenStructures(const ImageType * S1, + const ImageType * S2, + typename ImageType::PixelType BG, + int sliceDimension, + std::vector & A, + std::vector & B); //-------------------------------------------------------------------- @@ -430,7 +446,63 @@ namespace clitk { //-------------------------------------------------------------------- -} + //-------------------------------------------------------------------- + template + typename ImageType::Pointer + SliceBySliceSetBackgroundFromSingleLine(const ImageType * input, + typename ImageType::PixelType BG, + typename ImageType::PointType & A, + typename ImageType::PointType & B, + int dim1, int dim2, bool removeLowerPartFlag); + //-------------------------------------------------------------------- + + + //-------------------------------------------------------------------- + template + typename ImageType::Pointer + SliceBySliceSetBackgroundFromPoints(const ImageType * input, + typename ImageType::PixelType BG, + int sliceDim, + std::vector & A, + bool removeGreaterThanXFlag, + bool removeGreaterThanYFlag); + //-------------------------------------------------------------------- + + + //-------------------------------------------------------------------- + template + void + FillRegionWithValue(ImageType * input, typename ImageType::PixelType value, + typename ImageType::RegionType & region); + //-------------------------------------------------------------------- + + + //-------------------------------------------------------------------- + template + void + GetMinMaxBoundary(ImageType * input, typename ImageType::PointType & min, + typename ImageType::PointType & max); + //-------------------------------------------------------------------- + + + //-------------------------------------------------------------------- + template + typename itk::Image::Pointer//void + DistanceMap(const ImageType * input, typename ImageType::PixelType BG);//, + //-------------------------------------------------------------------- + + + //-------------------------------------------------------------------- + template + typename ImageType::PointType + ComputeClosestPoint(const ImageType * input, + const itk::Image * dmap, + typename ImageType::PixelType & BG); + //-------------------------------------------------------------------- + + + +} // end clitk namespace #include "clitkSegmentationUtils.txx"