I am making a dicom viewer by myself.
Changing the color of the dicom image was successful, but it's a solid color.
So, to solve the monochromatic part, I brought the dicom palette. https://dicom.nema.org/dicom/2013/output/chtml/part06/chapter_B.html
But it goes in a weird way and not the way I thought it would.
After much deliberation, I found out that there is a palette among the properties of the bitmap. But it doesn't work at all. As a result of searching, many answers may not work, and it is recommended to directly touch the pixel data. And the length of my palette is always zero.
Oncolor Red version
dicom HeartIronSetVersion
final target
for (int i = 0; i < bitmap2.Width; i++)
{
for (int j = 0; j < bitmap2.Height; j++)
{
actualColor = bitmap2.GetPixel(i, j);
int a = actualColor.A;
int r = actualColor.R;
Color col = palette[r];
//IronHeartsetWith Alpha
//redBitmap.SetPixel(i, j, Color.FromArgb(a, palette[r]));
//IronHeartSet
//redBitmap.SetPixel(i, j, col);
//RedVer
redBitmap.SetPixel(i, j, Color.FromArgb(a, r, 0, 0));
//redBitmap.SetPixel(i, j, Color.FromArgb((int)r, 1, 0, 0));
}
}