Coverage Report

Created: 2026-08-14 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/dcmtk/dcmimgle/libsrc/diovdat.cc
Line
Count
Source
1
/*
2
 *
3
 *  Copyright (C) 1996-2016, 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: DicomOverlayData (Source)
19
 *
20
 */
21
22
23
#include "dcmtk/config/osconfig.h"
24
#include "dcmtk/dcmdata/dctypes.h"
25
26
#include "dcmtk/dcmimgle/diovlay.h"
27
#include "dcmtk/dcmimgle/diovpln.h"
28
29
#include "dcmtk/ofstd/ofbmanip.h"
30
31
32
/*---------------*
33
 *  constructor  *
34
 *---------------*/
35
36
DiOverlayData::DiOverlayData(unsigned int entries,
37
                             unsigned int count)
38
0
  : Count(count),
39
0
    ArrayEntries(entries),
40
0
    Planes(NULL),
41
0
    DataBuffer(NULL)
42
0
{
43
0
    if ((entries > 0) && (entries <= DiOverlay::MaxOverlayCount))
44
0
    {
45
0
        Planes = new DiOverlayPlane *[entries];
46
0
        if (Planes != NULL)
47
0
            OFBitmanipTemplate<DiOverlayPlane *>::zeroMem(Planes, entries);
48
0
    }
49
0
}
50
51
52
/*---------------*
53
 *  destructors  *
54
 *---------------*/
55
56
DiOverlayData::~DiOverlayData()
57
0
{
58
0
    if (Planes != NULL)
59
0
    {
60
0
        unsigned int i;
61
0
        for (i = 0; i < ArrayEntries; ++i)
62
0
            delete Planes[i];
63
0
    }
64
0
    delete[] Planes;
65
0
    delete[] DataBuffer;
66
0
}