In my C++ Plugin, I have converted the ultrasound sweep into a volume(using GlSweepCompounding), the sweep and generated compounding volume looks ok. But after I use NiftiIO class to save the volume into nii file, the nii volume file has the different pose from original source volume. But in ImFusionSuite GUI I directly use the “export” to graphicallly save the nii file, this volume looks right.
Should I use the NiftiIO class to output the nii volume? or maybe there is other something wrong?
In uploaded picture, the white-yellow part is original sweep and volume(ShareImageSet), the red part is saved nii volume in different pose.
The ImFusionSuite version is 2.27.1
Please use the NiftiIoAlgorithm and not the underlying NiftiIO class. The latter only takes a matrix and stores it, but the matrix conventions between the ImFusion SDK (Left-Posterior-Superior) and the Nifti file format (Right-Anterior-Superior) are different. The NiftiIoAlgorithm handles the correct transformation between the two conventions.
Thank you for your deatiled answer. But in SDK of version 2.27.1, the NiftiIoAlgorithm seem doesn’t have the saving function, it’s only used to read the nii file. Maybe it is due to my ImFusion version’s problem?
No, the algorithm has been able to save images since the very beginning. Create the instance with the image to save provided in the constructor. Set the location (path to where the file should be saved), and call compute(). Again, the UI in the ImFusion Suite is doing exactly that.
Best,
Oliver