Coverage Report

Created: 2026-11-12 07:19

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/dcmtk/dcmimgle/libsrc/dimoimg5.cc
Line
Count
Source
1
/*
2
 *
3
 *  Copyright (C) 1996-2010, OFFIS e.V.
4
 *  All rights reserved.  See COPYRIGHT file for details.
5
 *
6
 *  This software and supporting documentation were developed by
7
 *
8
 *    OFFIS e.V.
9
 *    R&D Division Health
10
 *    Escherweg 2
11
 *    D-26121 Oldenburg, Germany
12
 *
13
 *
14
 *  Module:  dcmimgle
15
 *
16
 *  Author:  Joerg Riesmeier
17
 *
18
 *  Purpose: DicomMonochromeImage (Source, getData 32 bit)
19
 *
20
 */
21
22
23
#include "dcmtk/config/osconfig.h"
24
25
#include "dcmtk/dcmimgle/dimoimg.h"
26
#include "dcmtk/dcmimgle/dimoipxt.h"
27
#include "dcmtk/dcmimgle/dimoopxt.h"
28
#include "dcmtk/dcmimgle/diutils.h"
29
30
31
void DiMonoImage::getDataUint32(void *buffer,
32
                                DiDisplayFunction *disp,
33
                                const int samples,
34
                                const unsigned long frame,
35
                                const int bits,
36
                                const Uint32 low,
37
                                const Uint32 high)
38
0
{
39
0
    if (InterData != NULL)
40
0
    {
41
0
        if (InterData->isPotentiallySigned())
42
0
        {
43
0
            if (bits <= 8)
44
0
                OutputData = new DiMonoOutputPixelTemplate<Uint32, Sint32, Uint8>(buffer, InterData, Overlays, VoiLutData, PresLutData,
45
0
                    disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames, samples > 1);
46
0
            else if (bits <= 16)
47
0
                OutputData = new DiMonoOutputPixelTemplate<Uint32, Sint32, Uint16>(buffer, InterData, Overlays, VoiLutData, PresLutData,
48
0
                    disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames);
49
0
            else
50
0
                OutputData = new DiMonoOutputPixelTemplate<Uint32, Sint32, Uint32>(buffer, InterData, Overlays, VoiLutData, PresLutData,
51
0
                    disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames);
52
0
        } else {
53
0
            if (bits <= 8)
54
0
                OutputData = new DiMonoOutputPixelTemplate<Uint32, Uint32, Uint8>(buffer, InterData, Overlays, VoiLutData, PresLutData,
55
0
                    disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames, samples > 1);
56
0
            else if (bits <= 16)
57
0
                OutputData = new DiMonoOutputPixelTemplate<Uint32, Uint32, Uint16>(buffer, InterData, Overlays, VoiLutData, PresLutData,
58
0
                    disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames);
59
0
            else
60
0
                OutputData = new DiMonoOutputPixelTemplate<Uint32, Uint32, Uint32>(buffer, InterData, Overlays, VoiLutData, PresLutData,
61
0
                    disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames);
62
0
        }
63
0
    }
64
0
}
65
66
67
void DiMonoImage::getDataSint32(void *buffer,
68
                                DiDisplayFunction *disp,
69
                                const int samples,
70
                                const unsigned long frame,
71
                                const int bits,
72
                                const Uint32 low,
73
                                const Uint32 high)
74
0
{
75
0
    if (bits <= 8)
76
0
        OutputData = new DiMonoOutputPixelTemplate<Sint32, Sint32, Uint8>(buffer, InterData, Overlays, VoiLutData, PresLutData,
77
0
            disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames, samples > 1);
78
0
    else if (bits <= 16)
79
0
        OutputData = new DiMonoOutputPixelTemplate<Sint32, Sint32, Uint16>(buffer, InterData, Overlays, VoiLutData, PresLutData,
80
0
            disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames);
81
0
    else
82
0
        OutputData = new DiMonoOutputPixelTemplate<Sint32, Sint32, Uint32>(buffer, InterData, Overlays, VoiLutData, PresLutData,
83
0
            disp, VoiLutFunction, WindowCenter, WindowWidth, low, high, Columns, Rows, frame, NumberOfFrames);
84
0
}