15 #ifndef __vtkITKUtility_h 16 #define __vtkITKUtility_h 18 #include "vtkObjectFactory.h" 19 #include "vtkSetGet.h" 25 template <
typename ITK_Exporter,
typename VTK_Importer>
28 importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());
29 importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());
30 importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());
31 importer->SetSpacingCallback(exporter->GetSpacingCallback());
32 importer->SetOriginCallback(exporter->GetOriginCallback());
33 importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());
34 importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());
35 importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());
36 importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());
37 importer->SetDataExtentCallback(exporter->GetDataExtentCallback());
38 importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());
39 importer->SetCallbackUserData(exporter->GetCallbackUserData());
46 template <
typename VTK_Exporter,
typename ITK_Importer>
49 importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());
50 importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());
51 importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());
52 importer->SetSpacingCallback(exporter->GetSpacingCallback());
53 importer->SetOriginCallback(exporter->GetOriginCallback());
54 importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());
55 importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());
56 importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());
57 importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());
58 importer->SetDataExtentCallback(exporter->GetDataExtentCallback());
59 importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());
60 importer->SetCallbackUserData(exporter->GetCallbackUserData());
64 #define DelegateSetMacro(name,arg) DelegateITKInputMacro(Set##name,arg) 65 #define DelegateITKInputMacro(name,arg) \ 67 vtkDebugMacro( << this->GetClassName() << " (" << this << "): setting " #name " to " << #arg ); \ 68 ImageFilterType* tempFilter = dynamic_cast<ImageFilterType*> ( this->m_Filter.GetPointer() ); \ 71 tempFilter->name ( arg ); \ 76 #define DelegateGetMacro(name) DelegateITKOutputMacro (Get##name) 77 #define DelegateITKOutputMacro(name) \ 79 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): returning " #name ); \ 80 ImageFilterType* tempFilter = dynamic_cast<ImageFilterType*> ( this->m_Filter.GetPointer() ); \ 83 return tempFilter->name (); \ 87 vtkErrorMacro ( << this->GetClassName() << " Error getting " #name " Dynamic cast returned 0" ); \ void ConnectPipelines(ITK_Exporter exporter, VTK_Importer *importer)