<div dir="ltr">Dear All,<div><br></div><div>I am rendering a vtk File and I am using the ScalarOpacityFunction to map the scalar values in the file to different opacity values. The range of values in the VTK file is [0, 255] and I am  using the following lines of code to the mapping:</div><div><br></div><div> mitk::StandaloneDataStorage::Pointer ds = mitk::StandaloneDataStorage::New();<br></div><div><div> mitk::DataNode::Pointer node = nodeReader->GetOutput();</div><div> ds->Add(node);</div></div><div><div> mitk::Image::Pointer image = dynamic_cast<mitk::Image*>(node->GetData());</div><div> if(image.IsNotNull())</div><div> {</div><div>    node->SetProperty("volumerendering", mitk::BoolProperty::New(true));</div><div>    mitk::TransferFunction::Pointer tf = mitk::TransferFunction::New();<br></div></div><div>    tf->GetScalarOpacityFunction()->AddPoint (0.0, 0.0 );</div><div><span style="white-space:pre">    </span>tf->GetScalarOpacityFunction()->AddPoint (40.0, 0.0 );</div><div><span style="white-space:pre">    </span>tf->GetScalarOpacityFunction()->AddPoint (230.0, 0.9 );</div><div>    tf->GetScalarOpacityFunction()->AddPoint (255.0, 1.0 );</div><div>    node->SetProperty ( "TransferFunction", mitk::TransferFunctionProperty::New ( tf.GetPointer() ) );</div><div>    QmitkRenderWindow renderWindow;</div><div>    renderWindow.GetRenderer()->SetDataStorage(ds);<br></div><div>    renderWindow.GetRenderer()->SetMapperID(mitk::BaseRenderer::Standard3D);</div><div>    renderWindow.show();</div><div>    renderWindow.resize( 256, 256 );</div><div>    mitk::RenderingManager::GetInstance()->RequestUpdateAll();<br></div><div>}</div><div><br></div><div><br></div><div>However, there is a problem in the rendering result. The problem is that the very bright voxels are rendered in black while other voxels are rendered well. I have checked the file and I am sure that there is no problem with the values of the voxels that are supposed to be bright (I mean they really have high values in the range of [0 255]). I also played with values that I am feeding to the transfer function like setting mappings for values more than 255 (just in case the scalars in the file might be more than 255) still no difference. Would you please let me know what I am doing wrong.</div><div><br></div><div>Regards,</div><div>Mahsa</div></div>