[Insight-users] outputimagetype and imagetype

Luke khua1@jhu.edu
Thu May 6 18:11:00 EDT 2004


This is a multi-part message in MIME format.

------=_NextPart_000_002C_01C4336B.938794F0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm new to itk. I tried to connect itk and vtk together.=20

The following code connect vtkExporter to itkimporter.=20

typedef itk::Image<float, 3> ImageType;
 typedef itk::VTKImageImport<ImageType> ImageImportType;
 ImageImportType::Pointer itkImporter =3D ImageImportType::New();
 ConnectPipelines(vtkExporter, itkImporter);

I have this function call to get image.
 T_view->SetInputImage(itkImporter->GetOutput());

The setInputImage method need a ImageType pointer.
SetInputImage(ImageType * newImData)

I compiled the code and got following error.

cannot convert parameter 1 from =
'itk::ImageSource<TOutputImage>::OutputImageType *' to =
'QtGlSliceView::ImageType *'

How can I change itkImporter->GetOutput() to ImageType.

Thanks!

                                                                   Luke

------=_NextPart_000_002C_01C4336B.938794F0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I'm new to itk. I tried to connect itk =
and vtk=20
together. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The following code connect vtkExporter =
to=20
itkimporter. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>typedef itk::Image&lt;float, 3&gt;=20
ImageType;<BR>&nbsp;typedef itk::VTKImageImport&lt;ImageType&gt;=20
ImageImportType;<BR>&nbsp;ImageImportType::Pointer itkImporter =3D=20
ImageImportType::New();<BR>&nbsp;ConnectPipelines(vtkExporter,=20
itkImporter);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have this function call to get=20
image.<BR>&nbsp;T_view-&gt;SetInputImage(itkImporter-&gt;GetOutput());</F=
ONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The setInputImage method need a =
ImageType=20
pointer.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>SetInputImage(ImageType * =
newImData)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I compiled the code and got following=20
error.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>cannot convert parameter 1 from=20
'itk::ImageSource&lt;TOutputImage&gt;::OutputImageType *' to=20
'QtGlSliceView::ImageType *'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>How can I change =
itkImporter-&gt;GetOutput() to=20
ImageType.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Luke</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_002C_01C4336B.938794F0--




More information about the Insight-users mailing list