there is no copy constructor which permits not to copy pixel data; also note that there may be other elements besides pixel data (like overlays, LUT data, ...) which may be larger than "normal" elements.
What you can do before performing the copy: Remove the pixel data (but not delete it, copy the dataset and re-insert the pixel data. Something like this:
DcmElement* rememberPixelData = dataset->remove(DCM_PixelData);
if (elem == NULL)
return EC_IllegalCall; // no pixel data in dataset?!
DcmDataset* copyWithoutPixelData= new DcmDataset(dataset);
if (copyWithoutPixelData == NULL)
return EC_MemoryExhausted; // not enough memory?
OFCondition result = dataset->insert(rememberPixelData);
if (result.bad())
return EC_IllegalCall; // something went wrong...
I did not test that so there may be typos but I think the approach should work.