[vtkusers] converting between itk and vtk
Charl P. Botha
cpbotha at cpbotha.net
Wed Apr 5 07:57:15 EDT 2006
On 4/5/06, Erbacher, Markus <Markus.Erbacher at med.uni-heidelberg.de> wrote:
> I have written a two function to connect pipes from itk and vtk. Perhaps it helps. It works fine for me.
Well, perhaps what you meant to say is that these functions come from
InsightApplications/vtkITK/Common/vtkITKUtility.h ? :)
> template <typename ITK_Exporter, typename VTK_Importer>
> static void ConnectPipelines(ITK_Exporter Exporter, VTK_Importer* Importer)
> {
> Importer->SetUpdateInformationCallback(Exporter->GetUpdateInformationCallback());
> Importer->SetPipelineModifiedCallback(Exporter->GetPipelineModifiedCallback());
> Importer->SetWholeExtentCallback(Exporter->GetWholeExtentCallback());
> Importer->SetSpacingCallback(Exporter->GetSpacingCallback());
> Importer->SetOriginCallback(Exporter->GetOriginCallback());
> Importer->SetScalarTypeCallback(Exporter->GetScalarTypeCallback());
> Importer->SetNumberOfComponentsCallback(Exporter->GetNumberOfComponentsCallback());
> Importer->SetPropagateUpdateExtentCallback(Exporter->GetPropagateUpdateExtentCallback());
> Importer->SetUpdateDataCallback(Exporter->GetUpdateDataCallback());
> Importer->SetDataExtentCallback(Exporter->GetDataExtentCallback());
> Importer->SetBufferPointerCallback(Exporter->GetBufferPointerCallback());
> Importer->SetCallbackUserData(Exporter->GetCallbackUserData());
> }
>
> template <typename VTK_Exporter, typename ITK_Importer>
> static void ConnectPipelines(VTK_Exporter* Exporter, ITK_Importer Importer)
> {
> Importer->SetUpdateInformationCallback(Exporter->GetUpdateInformationCallback());
> Importer->SetPipelineModifiedCallback(Exporter->GetPipelineModifiedCallback());
> Importer->SetWholeExtentCallback(Exporter->GetWholeExtentCallback());
> Importer->SetSpacingCallback(Exporter->GetSpacingCallback());
> Importer->SetOriginCallback(Exporter->GetOriginCallback());
> Importer->SetScalarTypeCallback(Exporter->GetScalarTypeCallback());
> Importer->SetNumberOfComponentsCallback(Exporter->GetNumberOfComponentsCallback());
> Importer->SetPropagateUpdateExtentCallback(Exporter->GetPropagateUpdateExtentCallback());
> Importer->SetUpdateDataCallback(Exporter->GetUpdateDataCallback());
> Importer->SetDataExtentCallback(Exporter->GetDataExtentCallback());
> Importer->SetBufferPointerCallback(Exporter->GetBufferPointerCallback());
> Importer->SetCallbackUserData(Exporter->GetCallbackUserData());
> }
More information about the vtkusers
mailing list