itk::VTKImageToImageFilter使用问题
2015-04-18 10:11
204 查看
最近项目需要将vtkImageData*转换为itkImage* 格式,使用的是itk标准库来做,详见代码
typedef itk::Image< unsigned short, 2> ImageType;
typedef itk::VTKImageToImageFilter<ImageType> ConnectorType;
ConnectorType::Pointer Connector = ConnectorType::New();
Connector->SetInput(vtkImageData);
Connector->Update();
很奇怪的是,如果将定义语句(即 ImageType , ConnectorType , Connector)放在h文件的时候,编译会出现各种莫名其妙的错误,但一旦把上述几个变量作为局部变量的时候一切都正常。
奇怪的问题,一直想不懂。哪位大神知道的麻烦告知一声!
typedef itk::Image< unsigned short, 2> ImageType;
typedef itk::VTKImageToImageFilter<ImageType> ConnectorType;
ConnectorType::Pointer Connector = ConnectorType::New();
Connector->SetInput(vtkImageData);
Connector->Update();
很奇怪的是,如果将定义语句(即 ImageType , ConnectorType , Connector)放在h文件的时候,编译会出现各种莫名其妙的错误,但一旦把上述几个变量作为局部变量的时候一切都正常。
奇怪的问题,一直想不懂。哪位大神知道的麻烦告知一声!
相关文章推荐
- 使用ITK,VTK与QT过程遇到的一些问题
- 使用vtkVoxelContoursToSurfaceFilter由平行轮廓重建三角面片
- ERROR: vtkImageAccumulate : This filter can handle up to 3 components
- 使用eclipse遇到的unable to install breakpoint的问题
- [Android初级]关于使用universal-image-loader加载imagelist出现图片闪烁的问题
- android中,使用ant多渠道打包时出现Perhaps JAVA_HOME does not point to the JDK问题的解决方法
- 在maven项目中使用apache cxf中遇到异常 java.lang.ClassCastException: org.springframework.web.filter.CharacterEncodingFilter cannot be cast to javax.servlet.Filter
- Xcode6.1使用MJRefresh、SDWebImage,Too many arguments to function call, expected 0, have *
- 使用过滤器Filter解决Java系统中中文乱码的问题
- can not be cast to javax.servlet.Filter等问题的解决方法 推荐
- 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- 使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- (转)使用XCode6打开项目以后再用XCode5出现的问题fatal error: malformed or corrupted AST file: 'Unable to load module
- 【Android】【FAQ】解决windows7 64bit系统下部署android开发环境使用Android SDK Manager的failed to fetch问题
- ITK+VTK 混编学习过程中遇到的问题记录
- 使用Android-Universal-Image-Loader异步加载图片遇到的问题
- ITK+VTK+QT 读取DICOM序列图像遇到的问题(1)
- Android ImageView 常见问题与使用总结