How to extract frame from Multiframe Image/FrameSet? (JAVA)

Salu_Ramos
Tue, 07 Nov 2023 04:51:40 +0000
Beginner Questions

I have a multiframe instance loaded with ImageSeriesReader, and i want to know how am i supposed to extract a frame from the result Image/frameSet.

The below script was working fine for singleframe instances loaded as an Image/frameSet:

public static Image axisSlice (Image volume, long[] sliceSize, int[] sliceIndex) {
        VectorUInt32 vectorSize = new VectorUInt32(sliceSize);
        VectorInt32 vectorIndex = new VectorInt32(sliceIndex);
        return SimpleITK.extract(volume, vectorSize, vectorIndex);
    }

i’m working with simpleitk java version.

5 posts - 2 participants

Read full topic