# How to compare a slice and its next?

**URL:** <https://discourse.itk.org/t/how-to-compare-a-slice-and-its-next/3645>\
**Category:** Beginner Questions\
**Tags:** dicom, itkv5\
**Created:** [November 23, 2020, 6:16pm UTC](https://discourse.itk.org/t/how-to-compare-a-slice-and-its-next/3645 "2020-11-23T18:16:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enr\_Brunetti](https://discourse.itk.org/user_avatar/discourse.itk.org/enr_brunetti/32/1709_2.png) [@Enr\_Brunetti](https://discourse.itk.org/u/Enr_Brunetti)\
**Post date:** [November 23, 2020, 6:16pm UTC](https://discourse.itk.org/t/how-to-compare-a-slice-and-its-next/3645/1 "2020-11-23T18:16:35Z")

</div>

I have a series of CT slice and I want to compare these ones in the axial view, because I want to delete elements in the slice, that not appear in the following slices. Is there any function in ITK or OpenCV, that can perform this task?
