[Insight-users] VTK ITK pipeline update issues !

Shankar Narayana shank.nasa at gmail.com
Fri Aug 28 15:31:36 EDT 2009


Hi,

Can somebody please help me with this pipeline issue listed below. The same
commands were working with earlier VTK and ITK versions. Now, i have changed
the ITK version to 3.14.0 from 3.4.0 and things seems not to be working. It
is because of some data which is not getting udpated in ITK side. If i check
just the vtk data, i can view the image but when i apply the shiftscaleimage
filter to it, it stops working and i see blank image. Please guide me.

Regards,
Shankar Narayana (Nasa)


On Wed, Aug 26, 2009 at 11:50 AM, Shankar Narayana <shank.nasa at gmail.com>wrote:

> Hi ,
>  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.
>   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:
>
>     vtk_to_itk->Update();
>
> itk_from_vtk->SetUpdateInformationCallback(vtk_to_itk->GetUpdateInformationCallback());
>
> itk_from_vtk->SetPipelineModifiedCallback(vtk_to_itk->GetPipelineModifiedCallback());
>
> itk_from_vtk->SetWholeExtentCallback(vtk_to_itk->GetWholeExtentCallback());
>     itk_from_vtk->SetSpacingCallback(vtk_to_itk->GetSpacingCallback());
>     itk_from_vtk->SetOriginCallback(vtk_to_itk->GetOriginCallback());
>
> itk_from_vtk->SetScalarTypeCallback(vtk_to_itk->GetScalarTypeCallback());
>
> itk_from_vtk->SetNumberOfComponentsCallback(vtk_to_itk->GetNumberOfComponentsCallback());
>
> itk_from_vtk->SetPropagateUpdateExtentCallback(vtk_to_itk->GetPropagateUpdateExtentCallback());
>
> itk_from_vtk->SetUpdateDataCallback(vtk_to_itk->GetUpdateDataCallback());
>
> itk_from_vtk->SetDataExtentCallback(vtk_to_itk->GetDataExtentCallback());
>
> itk_from_vtk->SetBufferPointerCallback(vtk_to_itk->GetBufferPointerCallback());
>     itk_from_vtk->SetCallbackUserData(vtk_to_itk->GetCallbackUserData());
>     itk_from_vtk->Update();
>     m_GainFilter=GainFilterType::New();  // GainFilter type is typedef to
> ShiftScaleImageInPlaceFilter
>     m_GainFilter->SetShift(0.0);
>     m_GainFilter->SetScale(6.0);
>     m_GainFilter->SetInput(itk_from_vtk->GetOutput());
>     m_GainFilter->SetInput(GaussianNoise->GetOutput()); // Changed by
> Shankar to itk_from_vtk from m_BCFilter
>     m_GainFilter->Update();
>
>    itk_to_vtk->SetInput(m_GainFilter->GetOutput());
>    itk_to_vtk->Update();
>
>
> vtk_from_itk->SetUpdateInformationCallback(itk_to_vtk->GetUpdateInformationCallback());
>
> vtk_from_itk->SetPipelineModifiedCallback(itk_to_vtk->GetPipelineModifiedCallback());
>
> vtk_from_itk->SetWholeExtentCallback(itk_to_vtk->GetWholeExtentCallback());
>     vtk_from_itk->SetSpacingCallback(itk_to_vtk->GetSpacingCallback());
>     vtk_from_itk->SetOriginCallback(itk_to_vtk->GetOriginCallback());
>
> vtk_from_itk->SetScalarTypeCallback(itk_to_vtk->GetScalarTypeCallback());
>
> vtk_from_itk->SetNumberOfComponentsCallback(itk_to_vtk->GetNumberOfComponentsCallback());
>
> vtk_from_itk->SetPropagateUpdateExtentCallback(itk_to_vtk->GetPropagateUpdateExtentCallback());
>
> vtk_from_itk->SetUpdateDataCallback(itk_to_vtk->GetUpdateDataCallback());
>
> vtk_from_itk->SetDataExtentCallback(itk_to_vtk->GetDataExtentCallback());
>
> vtk_from_itk->SetBufferPointerCallback(itk_to_vtk->GetBufferPointerCallback());
>     vtk_from_itk->SetCallbackUserData(itk_to_vtk->GetCallbackUserData());
>     vtk_from_itk->Update();
>
>    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.
>
>   I get image slice not from any file but from VTK in realtime from a
> volume.
>
> Regards,
> Shankar
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090828/9e6680c4/attachment.htm>


More information about the Insight-users mailing list