my current task is to achieve the automation of dicom file generation. To do this I have a "base" file and from it I generated files with different tags/images and so on. While changing the tags is trivial, I have some questions regarding the images.
For the simplest of all cases lets say that I would like to manually change the brightness of all frames in a DICOM file.
While using something like this:
//my file has 397 frames
Uint8 *pixelData = (Uint8 *)(image->getOutputData(8,396 /*From 0 to 396*/));
for(int i=0;i<rows*columns;++i)
{
//do something here
}
seem to work, I don't see a way to save the processed pixels back to the file.
For this reason I assume that using:
Code: Select all
const unsigned char* myPixelData;
unsigned long Count;
dataset->findAndGetUint8Array(DCM_PixelData, myPixelData,&Count);
My questions are these:
Are there differences between these pixel values and the values from getOutputData() method?
I fail to realise what the variable Count , counts exactly.
Shouldn't the length of the pixel Array acquired from findAndGetUint8Array
be the same as = rows*columns*frames?
Sorry if I am not understanding something but I am a complete newbie with DICOM and dcmtk libs! Thanks for your help!