I want to complete a mask registration and add a mask to the dicom sequence to speed up the registration. I added a mask, but an error occurred in the title. I have checked my mask. There is data both internally and externally. How can I solve this problem
ITK ERROR: MattesMutualInformationImageToImageMetricv4(000001F33CCCA180): VirtualSampledPointSet must have 1 or more points.
I have no problem using 2d test, but these problems occur once I switch to 3d. Doesn’t itk support 3d mask?
when create the mask is consinderate the image spacing?
Not sure if this is the case, but the combination of small_mask + large_image + random_sampling can lead to this situation, see this long discussion and possible work-arounds. It is not about 2D vs. 3D, simply in 3D the chances of this happening are higher.
I did use the strategy as you said, my purpose is actually to generate the mask exactly the same as the original image, but I did not find the sample code, so this problem occurs, could you please remind me how to generate the mask of the same size as the original image, and how the mask is aligned with the original image, by real physical coordinates, Or is it aligned by image coordinates?
I got it，thanks very much.it help me a lot.