Sorry if this a silly question!
I am wondering if the "loadFile()" function loads the whole data dicom file or just the header. In other words,
does a code like this
OFCondition cond = fileformat.loadFile("filename");
DcmDataset* dataset = fileformat.getDataset();
if (dataset->findAndGetUint16Array(DCM_PixelData, pData).bad())
{
}
return the pixel data of the patient as a block of memory pointed to by pData?
Or I am missing something?
Thanks,
Zein
Readind data from Dicom
Moderator: Moderator Team
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: Readind data from Dicom
It most certainly isn't!zeinsalah wrote:Sorry if this a silly question!
No, it typically doesn't, thats what the loadAllDataIntoMemory() function is for .zeinsalah wrote:I am wondering if the "loadFile()" function loads the whole data dicom file or just the header. In other words,
I'm not entirely sure, but I think the findAndGetUint16Array() call will load missing data into memory if it isn't already there, so it should be fine.zeinsalah wrote:does a code like this
OFCondition cond = fileformat.loadFile("filename");
DcmDataset* dataset = fileformat.getDataset();
if (dataset->findAndGetUint16Array(DCM_PixelData, pData).bad())
{
}
return the pixel data of the patient as a block of memory pointed to by pData?
Or I am missing something?
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Readind data from Dicom
Right, it will load the Pixel Data element value field (if not yet done). Other long value fields will not be loaded.I'm not entirely sure, but I think the findAndGetUint16Array() call will load missing data into memory if it isn't already there, so it should be fine.
By the way, there's a "maxReadLength" parameter for the DcmFileFormat::readFile() method, which allows for specifying the exact length (in bytes) on what's a "long" (or "short") element value.
Who is online
Users browsing this forum: No registered users and 1 guest