Hi ,<br> I am a graduate student working with Qt, ITK and VTK. I have a volume from which I get a slice through VTK. Then, I pass the 2D slice through ITK to increase the gain and get it back to VTK. But when I check my output, there is no increase in gain. I am using ShiftScaleInPlaceImageFilter with scale set to 6.0 to increase my gain. <br>
The intensity of VTK slice pixels varies from 0 to 78. Even after passing through the shiftscale filter, my output varies from 0 to 78. I expected this to increase so that the image becomes brighter. Now, I am not sure whether my ITK filter is actually doing something. I have set the pipeline like this:<br>
<br> vtk_to_itk->Update();<br> itk_from_vtk->SetUpdateInformationCallback(vtk_to_itk->GetUpdateInformationCallback());<br> itk_from_vtk->SetPipelineModifiedCallback(vtk_to_itk->GetPipelineModifiedCallback());<br>
itk_from_vtk->SetWholeExtentCallback(vtk_to_itk->GetWholeExtentCallback());<br> itk_from_vtk->SetSpacingCallback(vtk_to_itk->GetSpacingCallback());<br> itk_from_vtk->SetOriginCallback(vtk_to_itk->GetOriginCallback());<br>
itk_from_vtk->SetScalarTypeCallback(vtk_to_itk->GetScalarTypeCallback());<br> itk_from_vtk->SetNumberOfComponentsCallback(vtk_to_itk->GetNumberOfComponentsCallback());<br> itk_from_vtk->SetPropagateUpdateExtentCallback(vtk_to_itk->GetPropagateUpdateExtentCallback());<br>
itk_from_vtk->SetUpdateDataCallback(vtk_to_itk->GetUpdateDataCallback());<br> itk_from_vtk->SetDataExtentCallback(vtk_to_itk->GetDataExtentCallback());<br> itk_from_vtk->SetBufferPointerCallback(vtk_to_itk->GetBufferPointerCallback());<br>
itk_from_vtk->SetCallbackUserData(vtk_to_itk->GetCallbackUserData());<br> itk_from_vtk->Update();<br> m_GainFilter=GainFilterType::New(); // GainFilter type is typedef to ShiftScaleImageInPlaceFilter<br>
m_GainFilter->SetShift(0.0); <br> m_GainFilter->SetScale(6.0); <br> m_GainFilter->SetInput(itk_from_vtk->GetOutput());<br> m_GainFilter->SetInput(GaussianNoise->GetOutput()); // Changed by Shankar to itk_from_vtk from m_BCFilter<br>
m_GainFilter->Update();<br> <br> itk_to_vtk->SetInput(m_GainFilter->GetOutput());<br> itk_to_vtk->Update();<br> <br> vtk_from_itk->SetUpdateInformationCallback(itk_to_vtk->GetUpdateInformationCallback());<br>
vtk_from_itk->SetPipelineModifiedCallback(itk_to_vtk->GetPipelineModifiedCallback());<br> vtk_from_itk->SetWholeExtentCallback(itk_to_vtk->GetWholeExtentCallback());<br> vtk_from_itk->SetSpacingCallback(itk_to_vtk->GetSpacingCallback());<br>
vtk_from_itk->SetOriginCallback(itk_to_vtk->GetOriginCallback());<br> vtk_from_itk->SetScalarTypeCallback(itk_to_vtk->GetScalarTypeCallback());<br> vtk_from_itk->SetNumberOfComponentsCallback(itk_to_vtk->GetNumberOfComponentsCallback());<br>
vtk_from_itk->SetPropagateUpdateExtentCallback(itk_to_vtk->GetPropagateUpdateExtentCallback());<br> vtk_from_itk->SetUpdateDataCallback(itk_to_vtk->GetUpdateDataCallback());<br> vtk_from_itk->SetDataExtentCallback(itk_to_vtk->GetDataExtentCallback());<br>
vtk_from_itk->SetBufferPointerCallback(itk_to_vtk->GetBufferPointerCallback());<br> vtk_from_itk->SetCallbackUserData(itk_to_vtk->GetCallbackUserData());<br> vtk_from_itk->Update();<br><br> When I check the range of values for vtk_to_itk and vtk_from_itk, they seems to be same. But i wanted to increase the intensity by passing through the ShiftScale filter. Can somebody please help me out in this issues.<br>
<br> I get image slice not from any file but from VTK in realtime from a volume.<br><br>Regards,<br>Shankar <br>