The voxel value is showing 'invalid'

I have one image and one segmentation. When I load the image as volume and the segmentation as segmentation everything seems fine with both. There is no NAN voxel value in any of image or segmentation. I use the code below to mask the image with the segment. However, after that when i load the masked image I saw it as below in slicer in which the voxel value shows ‘invalid’ in the left down. why this happening and what does it mean?

inputpath='/home/ImgAve_RIPV_Aff.nii.gz'
newimg_path='/home/SegAve_RIPV_Aff_label_0.2.nii.gz'

img = sitk.ReadImage(inputpath)
img_arr=sitk.GetArrayFromImage(img)

seg = sitk.ReadImage(newimg_path)
seg_arr=sitk.GetArrayFromImage(seg)


img_arr[seg_arr==0]=0

newimg11 = sitk.GetImageFromArray(img_arr)

img_ave1 = copyImageParameters(newimg11,img, inputpath)
sitk.WriteImage(img_ave1,'/home/mmm.nii.gz')

I also checked that there is no NAN in none of the segment and image. The image is an average image of 50 cases.

There is nothing wrong. invalid color name just means that the label value 1332 has no color name specified in the chosen color table.

Thank you for your answer but the image which is called “ImgAve_RIPV_Aff_label_0.2” is not a label map to have a color map. It is average of 50 CT images with voxel values 0 to more than 1332. so, it is not like a label map with only one voxel value of 1332. It was a CT image which was masked by a segment with the python code and after being masked, ‘invalid’ appeared in the resultant ct masked image. I would be very grateful if you could help in clarifying.

The image appears in the label layer (indicated by the L in the Data Probe), therefore it is a labelmap volume.

I think there is a heuristics that by default an image that has label in the filename is loaded as a labelmap, so if you want to load this image as a scalar volume instead then you need to change the default in the “Add data” window (or if you load it using Python then specify the {"labelmap": 0} property input of slicer.util.loadVolume).

image