[Insight-users] the problem in Vtk2Itk.
yasser salman
yass71 at yahoo.com
Thu, 12 Feb 2004 10:00:59 -0800 (PST)
Hi Luis..,
i added these lines below after vtk2itk connection
and disconnect the itk filters the same error message
appeard again .., when i disable these lines
the message disappeard , So i think Volume didn't
convert correctly to ITK...,
typedef itk::ImageFileWriter< InternalImageType>
WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetFileName("C:/Image.vtk");
writer->SetInput( cast->GetOutput() );
writer->Update();
plz informe me what can i do to cross over this
problem,..thanks ,,
yasser..--- Luis Ibanez <luis.ibanez at kitware.com>
wrote:
>
> Hi Yasser
>
> Thanks for posting the error message.
>
>
> From your description I understand that the
> section of your code that is reading and
> visualizing the DICOM files is working ok.
>
> And that the problem is related to the
> conversion of the ITK image to VTK image.
> or the VTK image to ITK image.
>
> Given that you have
>
> VTK2ITK-->>ITK Filters-->>ITK2VTK-->>Viz pipeline
>
>
> Could you please try the following:
>
> 1) Disconnect the ITK Filter from VTK2ITK and
> instead connect and itk::ImageFileWriter
> Then trigger the writer.
> The purpose of this test is to check
> whether the image gets converted to ITK
> correctly or not.
>
> If (1) works, then try the following:
>
> (2) reconnect the ITK filters and
> the conversion ITK2VTK but keep
> the visualization pipeline away.
> Connect an vtk writer at the
> output of ITK2VTK and run the
> pipeline. This should verify
> if the image gets passes back to
> VTK correctly.
>
>
> If (2) works, the problem is in the
> section between the vtkImageData
> generated by ITK2VTK and the viz pipeline.
>
>
>
> Please let us know what you find.
>
>
> Thanks
>
>
> Luis
>
>
> ----------------------
> yasser salman wrote:
>
> > Note: forwarded message attached.
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Finance: Get your refund fast by filing
> online.
> > http://taxes.yahoo.com/filing.html
> >
> >
> >
>
------------------------------------------------------------------------
> >
> > Subject:
> > [Insight-users] Re: From Vtk To Itk error message!
> > From:
> > yasser salman <yass71 at yahoo.com>
> > Date:
> > Wed, 11 Feb 2004 04:44:44 -0800 (PST)
> > To:
> > insight-users at itk.org
> >
> >
> > hi luis ..,
> > here is the error message..,
> > thanx..
> > yasser
> > --- Luis Ibanez <luis.ibanez at kitware.com> wrote:
> >
> >>
> >>Hi Yasser,
> >>
> >>
> >>Could you please share with us the
> >>run time error message that you get ?
> >>
> >>
> >>That will help us a lot :-)
> >>
> >>
> >>Thanks
> >>
> >>
> >> Luis
> >>
> >>
> >>
> >>---------------------
> >>yasser salman wrote:
> >>
> >>
> >>>hi Luis..,
> >>>the same Runtime Error Message Appeared,, the
> >>
> >>first
> >>
> >>>part working good (displayed the dicom files
> found
> >>
> >>in
> >>
> >>>../../Nesma1)
> >>>at the second part the vtk Renderwindow
> >>
> >>initialized
> >>
> >>>to display the output files after volume
> processed
> >>
> >>by
> >>
> >>>itk filters but the run
> >>>time error message occured,, what i did..,
> >>>1- update my itk to ver 1.6.0 . run Cmake and
> >>
> >>complie
> >>
> >>>a new itk.dsw (no problem)
> >>>2- update my itkApplication to ver1.6.0 ..
> >>>3- minimize my code to avoid itk filters in order
> >>
> >>to
> >>
> >>>Detect where the problem is ,I found that the
> same
> >>
> >>>run time Error message occured , i excepect that
> >>
> >>the
> >>
> >>>error in VTK2ITKconnector->SetInput( Reader
> >>>->GetOutput() );
> >>>so i check out the itkVTKImageToImageFilter.h and
> >>>found that
> >>> void SetInput( vtkImageData * );
> >>>and also itkVTKImageToImageFilter.txx found that
> >>>
> >>>VTKImageToImageFilter<TOutputImage>
> >>>::SetInput( vtkImageData * inputImage )
> >>>
> >>>does it mean any thing about the error.., here is
> >>
> >>the
> >>
> >>>mini code that i did..,
> >>>thanx Luis and waiting ur suggestion about that
> >>
> >>..,
> >>
> >>>yasser ..,
> >>>
> >>>
> >>>
> >>>
> >>>int main( int argc, char ** argv )
> >>>{
> >>>
> >>>
> >>> typedef unsigned char InputPixelType;
> >>> typedef unsigned char InternalPixelType;
> >>> typedef unsigned char SegmentedPixelType;
> >>>
> >>> typedef itk::Image< InputPixelType, 3 >
> >>>InputImageType;
> >>> typedef itk::Image< InternalPixelType, 3>
> >>>InternalImageType;
> >>> typedef itk::Image< SegmentedPixelType, 3 >
> >>>SegmentedImageType;
> >>>
> >>>
> >>> typedef itk::CastImageFilter<
> >>> InputImageType,
> >>> InternalImageType >
> >>>CastImageFilterType;
> >>>
> >>>
> >>> typedef itk::ImageToVTKImageFilter<
> >>>SegmentedImageType >
> >>>ITK2VTKConnectorFilterType;
> >>>
> >>> typedef itk::VTKImageToImageFilter<
> >>
> >>InputImageType
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html