# Resizing Mask - Error during Feature extraction

**URL:** <https://discourse.slicer.org/t/resizing-mask-error-during-feature-extraction/18036>\
**Category:** Support\
**Tags:** segmentation, python\
**Created:** [June 9, 2021, 12:29pm UTC](https://discourse.slicer.org/t/resizing-mask-error-during-feature-extraction/18036 "2021-06-09T12:29:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tduplessis](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tduplessis/32/11182_2.png) [@tduplessis](https://discourse.slicer.org/u/tduplessis)\
**Post date:** [June 9, 2021, 12:29pm UTC](https://discourse.slicer.org/t/resizing-mask-error-during-feature-extraction/18036/1 "2021-06-09T12:29:28Z")

</div>

Hallo

I am extracting features from 2D x-rays. The segmentation model I used created png masks of 256x256 pixels. My original x-rays are 1024x1024 pixels. So I have increased the masks with a simple python function, np.repeat(), in both dimensions and converted the array back to png images (with uint8 data type). But when I try to used these masks with the corresponding x-ray (image and mask formats and sizes are the same), I get the following error.

RuntimeError: Exception thrown in SimpleITK LabelStatisticsImageFilter\_Execute: d:\a\1\sitk\code\common\include\sitkDualMemberFunctionFactory.hxx:214:  
sitk::ERROR: Pixel type: vector of 8-bit unsigned integer is not supported in 2D byclass itk::simple::LabelStatisticsImageFilter

How can I increase a 256x256 mask to 1024x1024 without getting this error?

Thanks for your help!
