help > itk::ERROR: Total Mass of the image was zero.
Showing 1-6 of 6 posts
Display:
Results per page:
Nov 3, 2026  11:11 PM | wbbevis - Wisconsin Alzheimer's Disease Research Center, UW-Madison
itk::ERROR: Total Mass of the image was zero.

Hello ARTS forum,


I'm just beginning processing of a large (1000+ session) dataset through this pipeline. Within my first few runs I'm seeing quite a few failures. One that stands out appears to be trouble with ITK missing an image output (or trying to use an all-zeros image) during the diffusion anisotropy phase (see the screenshot as well):


*** Calculating diffusion anisotropy features...


Registering subject to IIT template (may take a few minutes)...


All_Command_lines_OK


Using double precision for computations.


Exception Object caught:


 


itk::ExceptionObject (0x558f230)


Location: "unknown"


File: /src/ants/build/ITKv5-install/include/ITK-5.0/itkImageMomentsCalculator.hxx


Line: 156


Description: itk::ERROR: ImageMomentsCalculator(0x55aed10): Compute(): Total Mass of the image was zero. Aborting here to prevent division by zero later on.


 


Based on other people's encounters with this particular ITK error, I'm guessing the DTI I'm feeding the pipeline is missing the "IIT template" somehow, resulting in a null image, but that's a total guess. Any suggestions here would be much appreciated!


Thanks,


Bill

Nov 9, 2026  06:11 PM | Arnold Evia Jr.
RE: itk::ERROR: Total Mass of the image was zero.

Hello Bill,


Can you verify that the FA map was generated correctly? In the dataset folder, it should be at FA_processing/tbss/FA/reorient_input_FA.nii.gz


The IIT template is a file that is unmodified and in a fixed location throughout the run, so it is unlikely to be missing or empty.


Best,
Arnold

Nov 9, 2026  07:11 PM | wbbevis - Wisconsin Alzheimer's Disease Research Center, UW-Madison
RE: itk::ERROR: Total Mass of the image was zero.

Yes, the file exists, but it's a completely black volume. 


I'm attaching an annotated screenshot of the DTI directory from one of these failures, in case that helps with context. Green Arrows look like a normal DTI image, yellow arrows are "ok" (they're noise, so I'm not sure what I'm looking at, but I'm accepting it), and red arrows are featureless black volumes.


Thanks,


Bill

Nov 9, 2026  10:11 PM | Arnold Evia Jr.
RE: itk::ERROR: Total Mass of the image was zero.

That context narrows it down to the possibility that the diffusion tensors were not calculated correctly. Can you share the processing log? I will be looking for an error or warning that happens earlier in the pipeline than when you screenshotted.


-Arnold

Nov 10, 2026  03:11 PM | wbbevis - Wisconsin Alzheimer's Disease Research Center, UW-Madison
RE: itk::ERROR: Total Mass of the image was zero.

Attached. Thanks, Arnold!


Bill

Attachment: processing copy.log
Nov 11, 2026  02:11 AM | Arnold Evia Jr.
RE: itk::ERROR: Total Mass of the image was zero.

Unfortunately, the processing log does not provide any more insight. Can you send the import_up_proc folder to me through email? My email is Arnold_Evia@rush.edu.


Does this error happen for all or some of your data?


-Arnold