vtk中vtkDICOMImageReader调用流程分析
来源:互联网 发布:软件找不到指定模块 编辑:程序博客网 时间:2024/06/04 00:26
vtkDICOMImageReader *reader=vtkDICOMImageReader::New();
reader->SetDirectoryName("flodername");
reader->Update();
int vtkStreamingDemandDrivenPipeline::Update(int port,
vtkInformationVector* requests)retval = retval && this->UpdateData(port);
vtkDemandDrivenPipeline
return this->ProcessRequest(this->DataRequest,
this->GetInputInformation(),
this->GetOutputInformation());
int vtkStreamingDemandDrivenPipeline
::ProcessRequest(vtkInformation* request,
vtkInformationVector** inInfoVec,
vtkInformationVector* outInfoVec)
if(request->Has(REQUEST_DATA()))
{
vtkDemandDrivenPipeline
int vtkDemandDrivenPipeline::ProcessRequest(vtkInformation* request,
vtkInformationVector** inInfoVec,
vtkInformationVector* outInfoVec)
// Request data from the algorithm.
result = this->ExecuteData(request,inInfoVec,outInfoVec);
// Handle REQUEST_DATA
int vtkCompositeDataPipeline::ExecuteData(vtkInformation* request,
vtkInformationVector** inInfoVec,
vtkInformationVector* outInfoVec)
int vtkDemandDrivenPipeline::ExecuteData(vtkInformation* request,
vtkInformationVector** inInfo,
vtkInformationVector* outInfo)
{
this->ExecuteDataStart(request, inInfo, outInfo);
// Invoke the request on the algorithm.
// vtkMTimeType mTimeBefore = this->Algorithm->GetMTime();
int result = this->CallAlgorithm(request, vtkExecutive::RequestDownstream,
inInfo, outInfo);
// if (mTimeBefore != this->Algorithm->GetMTime())
// {
// vtkWarningMacro(<< this->Algorithm->GetClassName()
// << " modified it's MTime during RequestData(). "
// << "This may lead to unnecessary pipeline "
// << "executions");
// }
this->ExecuteDataEnd(request, inInfo, outInfo);
return result;
}
//----------------------------------------------------------------------------
int vtkExecutive::CallAlgorithm(vtkInformation* request, int direction,
vtkInformationVector** inInfo,
vtkInformationVector* outInfo)
{
// Copy default information in the direction of information flow.
this->CopyDefaultInformation(request, direction, inInfo, outInfo);
// Invoke the request on the algorithm.
this->InAlgorithm = 1;
int result = this->Algorithm->ProcessRequest(request, inInfo, outInfo);
this->InAlgorithm = 0;
// If the algorithm failed report it now.
if(!result)
{
vtkErrorMacro("Algorithm " << this->Algorithm->GetClassName()
<< "(" << this->Algorithm
<< ") returned failure for request: "
<< *request);
}
return result;
}
//----------------------------------------------------------------------------
int vtkImageAlgorithm::ProcessRequest(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector)
{
// generate the data
if(request->Has(vtkDemandDrivenPipeline::REQUEST_DATA()))
{
return this->RequestData(request, inputVector, outputVector);
}
// execute information
if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
{
return this->RequestInformation(request, inputVector, outputVector);
}
// propagate update extent
if(request->Has(vtkStreamingDemandDrivenPipeline::REQUEST_UPDATE_EXTENT()))
{
return this->RequestUpdateExtent(request, inputVector, outputVector);
}
return this->Superclass::ProcessRequest(request, inputVector, outputVector);
}
//----------------------------------------------------------------------------
// This is the superclasses style of Execute method. Convert it into
// an imaging style Execute method.
int vtkImageAlgorithm::RequestData(
vtkInformation* request,
vtkInformationVector** vtkNotUsed( inputVector ),
vtkInformationVector* outputVector)
{
// the default implimentation is to do what the old pipeline did find what
// output is requesting the data, and pass that into ExecuteData
// which output port did the request come from
int outputPort =
request->Get(vtkDemandDrivenPipeline::FROM_OUTPUT_PORT());
// if output port is negative then that means this filter is calling the
// update directly, in that case just assume port 0
if (outputPort == -1)
{
outputPort = 0;
}
// get the data object
vtkInformation *outInfo =
outputVector->GetInformationObject(outputPort);
// call ExecuteData
this->SetErrorCode( vtkErrorCode::NoError );
if (outInfo)
{
this->ExecuteDataWithInformation( outInfo->Get(vtkDataObject::DATA_OBJECT()),
outInfo );
}
else
{
this->ExecuteData(NULL);
}
// Check for any error set by downstream filter (IO in most case)
if ( this->GetErrorCode() )
{
return 0;
}
return 1;
}
void vtkDICOMImageReader::ExecuteDataWithInformation(vtkDataObject *output,
vtkInformation *outInfo)
{
0 0
- vtk中vtkDICOMImageReader调用流程分析
- VTK 读取dicom 出错 : vtkDICOMImageReader returned failure for request: vtkInformation
- VTK中世界坐标系到显示坐标系下的流程分析
- vtk中体绘制源码分析
- vtk中基本图元结构分析
- socket调用流程分析
- FUSE调用流程分析
- socket调用流程分析
- FUSE调用流程分析
- Zygote调用流程分析
- Android O 中CarAudioManager的调用流程分析
- SylixOS中MTD调用底层接口流程分析
- vtkImageData vtkDicomImageReader
- VTK显示流程
- VTK大体流程
- UART 调用流程分析小结
- 分析springmvc底层调用流程
- Ceilometer API调用流程分析
- 关于汇编中的NEG指令正解!(补码,反码,原码)现实意义
- Android 6.0 运行时权限
- mybatis实战教程(mybatis in action),mybatis入门到精通
- MySQL5.7.10 安装文档
- 15 套接字和标准IO
- vtk中vtkDICOMImageReader调用流程分析
- Problem A. Diwali lightings Google APAC 2017 University Test Round E
- [Android]Eclipse用正式签名创建debug签名。
- Python元类编程
- securecrt 多窗口执行命令
- spring mvc官方文档提炼总结
- Node.js的文件系统的Api
- 遍历List<Map<String, Object>>
- oracle 11g 完全卸载