[英]get region of interest using binary mask c++ itk
I am pretty new to ITK and have therefore almost no experiences using it. 我对ITK相当陌生,因此几乎没有使用它的经验。 My problem is:
我的问题是:
I have two nifti images: one medical image and one binary image representing a Volume of interest. 我有两个nifti图像:一个医学图像和一个代表感兴趣体积的二进制图像。 I would like to extract from the medical image only the region of the volume of interest.
我想从医学图像中仅提取感兴趣体积的区域。 I would like to store the intensity value of this region in a multidimensional array.
我想将此区域的强度值存储在多维数组中。 Until now I read the image and the mask and stored their values in a multidimensional array.
到目前为止,我读取图像和蒙版并将其值存储在多维数组中。 i could now compare the values pixel by pixel but I hope, there might be an easier way?
我现在可以逐像素比较值,但我希望可能会有更简单的方法?
That sounds like a job for Region of interest filter . 这听起来像是“感兴趣的区域”过滤器的工作 。 First you need to determine the "bounding region" around your mask.
首先,您需要确定蒙版周围的“边界区域”。 You should use an iterator for that.
您应该为此使用迭代器 。 If you construct your pipeline (reader->regionOfInterest->writer) without intermediate
Update()
calls and with streaming , with some image formats (eg meta-image) your intensity image does not need to be even completely read from disk. 如果在没有中间
Update()
调用和流传输的情况下构造管道(reader-> regionOfInterest-> writer),并且使用某些图像格式(例如,元图像),甚至不需要从磁盘上完全读取强度图像。
You might also be interested in LabelGeometryImageFilter . 您可能也对LabelGeometryImageFilter感兴趣。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.