MCPcopy Create free account
hub / github.com/MITK/MITK / MakeImage

Function MakeImage

Modules/PET/test/mitkSUVInputModelTest.cpp:33–40  ·  view source on GitHub ↗

Minimal mitk::Image acting as an IPropertyProvider for the classifier. The pixel data is irrelevant; only the property list matters.

Source from the content-addressed store, hash-verified

31 // classifier. The pixel data is irrelevant; only the property list
32 // matters.
33 mitk::Image::Pointer MakeImage()
34 {
35 mitk::Image::Pointer image = mitk::Image::New();
36 const auto pixelType = mitk::MakeScalarPixelType<float>();
37 const unsigned int dims[3] = { 1u, 1u, 1u };
38 image->Initialize(pixelType, 3, dims);
39 return image;
40 }
41
42 // Set a DICOM tag value on the image (top-level tag, no sequence).
43 void SetDicomTag(mitk::Image* image, unsigned int group, unsigned int element,

Calls 2

NewFunction · 0.50
InitializeMethod · 0.45

Tested by

no test coverage detected