Hi,
ok, now it works great with TImageEnView
TIEBitmap *bmp = new TIEBitmap();
TImageEnIO *pIO = new TImageEnIO(bmp);
pIO->NativePixelFormat = true;
pIO->Params->DICOM_Range = iedrSetBlackWhite;
pIO->LoadFromFile("D:\\slice-205.dcm");
double dcenter = pIO->Params->DICOM_WindowCenterOffset + this->edLevel->Text.ToDouble();
double dMin = dcenter - 0.5 - (this->edWidth->Text.ToDouble() -1) /2;
double dMax = dcenter - 0.5 + (this->edWidth->Text.ToDouble() -1) /2;
bmp->BlackValue = dMin;
bmp->WhiteValue = dMax;
this->img->IEBitmap->Assign(bmp);
The only thing left is the same with MultiSlice-Files. Here we use TImageEnMView to load the File.
ImageEnMView1->MIO->Params->DICOM_Range = iedrSetBlackWhite;
ImageEnMView1->MIO->LoadFromFile("D:\\Multi\\I24.dcm");
Params is here not possible because ImageEnMView1->MIO->Params = NULL
Is it possible to set the DICOM_Range before loading the File to TImageEnMView?
Patrick