Skip to content
Discussion options

You must be logged in to vote

As a quick test, I tried adding an extra constructor to ImageData to specify the frame:

public ImageData(DicomDataset dataset, int frame)
{
    Dataset = dataset
        .Clone(DicomTransferSyntax.ExplicitVRLittleEndian); // ensure decompressed
    Geometry = new FrameGeometry(Dataset, frame);
    PixelData = DicomPixelData.Create(Dataset);
    Pixels = PixelDataFactory.Create(PixelData, frame);

    SortingValue = Geometry.DirectionNormal.DotProduct(Geometry.PointTopLeft);
}

And then constructed VolumeData from that:

var numberOfFrames = dicomFile.Dataset.GetSingleValue<int>(DicomTag.NumberOfFrames);

var sliceImageData = Enumerable.Range(0, numberOfFrames)
    .Select(frame => new Imag…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gofal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant