Hi Aida,
I recommend you to avoid using DataEntityHelper. This class
is deprecated. Could you please try to use GetProcessingData() function of
your Processor class?
Using DataEntityHelper, data will not be switched to the
specific data type you are asking for. For example, if the DataEntity stores
an image of type itk::Image<char,3>::Pointer and you are requesting a data
of type vtkSmartPointer<vtkImageData>, using DataentityHelper, will give you
an exception because the DataEntity does not contain what you are
requesting.
However if you use GetProcessingData() function of your
Processor class, the processing data of the DataEntity
(itk::Image<char,3>::Pointer) will be automatically switched to the
requested data type (vtkSmartPointer<vtkImageData>) and your request will be
satisfied correctly.
Best,
Xavi
From: Aida Ninyerola [mailto:[email protected]]
Sent: lunes, 03 de octubre de 2011 14:44
To: [email protected]
Subject: [Gimias-developers] GetProcessingData problem
Hi,
We need to work with a vtk image that we take following the code
Core::DataEntityHelper::GetProcessingData( GetInputDataEntityHolder( 0 ),
vtkInputImage);
But there is an exception as we get and error saying that there is not input
data.
If we follow the code
template <class ProcessingDataType>
void Core::DataEntityHelper::GetProcessingData(
Core::DataEntityHolder::Pointer dataEntityHolder,
ProcessingDataType &processingData,
int iTimeStep /*= 0*/ )
{
Core::DataEntity::Pointer dataEntity;
dataEntity = dataEntityHolder->GetSubject( );
if ( dataEntity.IsNull( ) )
{
throw
Core::Exceptions::Exception("DataEntityHelper::GetProcessingData",
"You must select an input data from the Processing Browser and
set it as input"
);
}
dataEntity->GetProcessingData( processingData, iTimeStep );
if( !processingData )
{
throw
Core::Exceptions::Exception("DataEntityHelper::GetProcessingData",
"You must select an input data from the Processing Browser and
set it as input"
);
}
}
The first part is working well but it is when it achieves GetProcessingData
that something is not working.
Can you help us to fix this problem?
Thank you very much,
Aida
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers