Resample volume with unregular spacing

Hi everyone,

I’m trying to resampled a volume with an unregular spacing along Z axis.
I followed this post but I encountered issue when resampling.
Here are the steps I followed:

  • Loading dicom volume as dicomVolume
  • It also creates an acquisition transform transform (vtkMRMLGridTransform)
  • I used Resample Scalar Volume by specifying output spacing (I’ll use the output as an input for the other Resample filter) with dicomVolume as an input and create a new volume tempResampledVolume
  • I launch the Resample Image (BRAINS) by setting:
    – ImageToWrap: dicomVolume
    – Reference image: tempResampledVolume
    – Transform file: transform
    The resampling fails with this error :
[FAILED]
Error while reading the the file C:/blablabla/Slicer/BJAIA_vtkMRMLGridTransformNodeB.h5

itk::ExceptionObject (000000D6A50FDA00)
Location: "unknown" 
File: D:\D\S\Slicer-1-build\ITK\Modules\IO\TransformBase\src\itkTransformIOBase.cxx
Line: 62
Description: itk::ERROR: itk::ERROR: HDF5TransformIOTemplate(0000024174726940): Could not create an instance of "InverseDisplacementFieldTransform_double_3_3"
The usual cause of this error is not registering the transform with TransformFactory
Currently registered Transforms: 
	"AffineTransform_double_2_2"
	"AffineTransform_double_3_3"
	"AffineTransform_double_4_4"
	"AffineTransform_float_2_2"
	"AffineTransform_float_3_3"
	"AffineTransform_float_4_4"
	"AzimuthElevationToCartesianTransform_double_3_3"
	"AzimuthElevationToCartesianTransform_float_3_3"
       .....

My understanding is that there are some issue with the transform but I don’t understand what exactly.
Thanks for your help.

Can you re-send the post you linked to? It’s not coming through.

As a workaround you can use the “harden transform” option in the transforms module.

Sorry for the fail.
Here is the link

Thanks! Yes, I figured it was that one or something similar.

For now I think hardening the volume through the transforms or data module is best. Passing the grid transform to the brains resampler really should work and I’m not sure why it doesn’t.

Thanks for your fast answer. Indeed, I was able to apply the harden transform. I didn’t remember how to do this. It seems to work well. Thanks !!