I am using DcmDataset to get original pixel data but when I write the array generated one only value is shown. I am using the fallowing code:
DcmFileFormat fileformat;
OFCondition status=fileformat.loadFile(NameImg.text());
if(status.good())
{
fileformat.getDataset()->findAndGetUint16Array(DCM_PixelData,buffer );
}
please give me suggestion.
access original pixel data
Moderator: Moderator Team
access original pixel data
thanks!. it was only buffer var that it wasn't NULL and this isn't explicit in documention. I was allocating and the metod finandgetuint16array was failing.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
I don't think that there are any ambiguities:
Code: Select all
/** find element and get value as an array of unsigned 16-bit integers.
* Applicable to the following VRs: AT, OW, US
* The result variable 'value' is automatically set to NULL if an error occurs.
* @param tagKey DICOM tag specifying the attribute to be searched for
* @param value variable in which the reference to the element value is stored
* @param count stores number of items in the result array (if not NULL)
* @param searchIntoSub flag indicating whether to search into sequences or not
* @return EC_Normal upon success, an error code otherwise.
*/
OFCondition findAndGetUint16Array(const DcmTagKey &tagKey,
const Uint16 *&value,
unsigned long *count = NULL,
const OFBool searchIntoSub = OFFalse);
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest