I used the "getInterData" method for reading the real pixel data. But I don't know how use this methode with multifram dicom files ?
I only have the first frame
First of all, you shouldn't mix output (rendered) and intermediate pixel data as you do with getOutputDataSize() and getInterData().
Regarding your actual question: The pixel data of all frames are stored consecutively. Please note, however, that color images are internally stored in planes!
You should check what the internal representation of the pixel data is, i.e. you should use DiPixel::getRepresentation(). The resolution of the image can be determined with getRows(), getColumns() and getFrameCount().
Ok thank you for your help.
Another question, should I use the "getInputCount" method or "getCount()" to determine the number of bytes of the file
I used the internal representation and I created 6 methods like this : (example for unsigned char*)
Using DiPixel::getCount() would be correct since you are interested in the intermediate representation and not in the PixelData element stored in the DICOM dataset.
I used the internal representation and I created 6 methods like this : (example for unsigned char*)
Looks pretty cumbersome. Why don't you use a C++ template (or a switch statement) for the 6 variants? By the way, casting away const from the return value of DiPixel::getData() and freeing this memory is no good idea! Also, what is the purpose of checking the "value" parameter for being non-NULL after you copied data to it? Your code does not seem to be very robust.
Ok thank you for your reply. I created of course a template for this method. Yesterday, it was just a test.
My project was developed in C++ Builder, and I uses Visual Studio C++ to create a DLL for mangling methods between C++ Builder and VSC++.
Hello,
I have some troubles with different multi frame dicom files. Can I send you this files If yes, how
For exemple, I have a dicom file with 15 frames. The "type representation" is "unsigned char*"; I recover the 8 first frames correctly, but not the other frames ... the frame 9 to 15 is binary the same But in reality no ...
I looked the file with "Dicom Eye" and with my own Viewer in C++ Builder, the 8 first frames are the same, but the other frames no ...
I don't understand what is happens.
You should first check that the issue is not related to your code. This could e.g. be done by using the DCMTK command line tool dcm2pnm/dcmj2pnm with option --all-frames and --write-bmp (if you prefer BMP images as output).