-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying Pixel Data with Multiple frames #1
Comments
Hi @ekin-remedy, thank you for your suggestion. I didn't test with multiframe DICOMs. Do you have publicly an available multiframe DICOM or the link to it? I'd like to have one that use to develop and test. Thank you so much. |
@WoonchanCho Pydicom has a bunch of test dicom files here. This has some multiframe DICOMs as well (e..g OBXXXX1A_2frame.dcm, SC_rgb_2frame.dcm, SC_rgb_expb_2frame.dcm) These files can be useful for testing the code with different DICOM files (various compressions, missing data, etc.) as well. Thank you! |
I think you should be able to get the masking to work with multiple frames by looping over the number of frames in the pixel manipulation logic (in for (let frame = 0; frame < numFrames; ++frame) {
const frameStart = frame * width * height * samplesPerPixel;
for (let i = top; i < bottom; ++i) {
const offset = (width * i + left) * samplesPerPixel + frameStart;
const limit = offset + (right - left) * samplesPerPixel;
for (let j = offset; j < limit; ++j) {
pixelData[j] = darkestValue;
}
}
} where |
@ekin-remedy Looks great. Thank you so much for your support and suggestion. It looks good to me. I will try to update and test soon and let you know! |
Hi @WoonchanCho ,
I came across your dicomedit library while looking for Javascript libraries that can do DICOM pixel data manipulation. FIrst of all, it looks great and works really well! I have one question: Does this library support modifying pixels on multiframe dicoms? I used your example dicom anonymizer app (https://testanonymizer.web.app/) and it seemed like the
alterPixels
only draws the rectangle on the first frame for a multiple frame dicom.The text was updated successfully, but these errors were encountered: