Hi Aida,
I found an easier method to get what you need. Once the
UpdateOutput() is called from your processor, and before adding your
data to the rendering tree, remove the property "levelwindow" from the
rendering node. Then, the level window property will be computed again
automatically:
1. In your panel widget, you need to disable the default output
processor observer (if any):
void SandboxPlugin::ResamplePanelWidget::OnInit( )
{
if ( GetProcessorOutputObserver( 0 ).IsNotNull( ) )
{
GetProcessorOutputObserver( 0 )->SetEnable( false );
}
}
2. In your panel widget, you need to overwrite the function
OnModifiedOutput():
void SandboxPlugin::ResamplePanelWidget::OnModifiedOutput( int num )
{
try
{
mitk::DataTreeNode::Pointer node;
Core::CastAnyProcessingData( GetRenderingTree( )->GetNode(
m_Processor->GetOutputDataEntity( 0 ) ), node );
if ( node.IsNotNull( ) &&
m_Processor->GetOutputDataEntity( 0 )->GetMTime( ) >
m_Processor->GetOutputDataEntity( 0 )->GetRenderingData( "MITK"
)->GetMTime( ) )
{
node->SetVisibility( false );
node->GetPropertyList( )->DeleteProperty( "levelwindow"
);
}
Core::DataTreeHelper::PublishOutput(
m_Processor->GetOutputDataEntityHolder( 0 ), GetRenderingTree( ) );
}
coreCatchExceptionsReportAndNoThrowMacro(
"ResamplePanelWidget::OnModifiedInput" );
}
Best regards,
Xavi
2012/8/28 Aida Ninyerola <[email protected]>:
> Yes! That was what I was trying to describe.
>
> Thanks for the explanation.
>
> In my processor, each time my image is computed the UpdateOutput function is
> called like this
> UpdateOutput(count,imageSuma , "ColapsedImage", true, 1, NULL, metaData);
> where previously to metaData I added the Modality tag.
>
> In order to adjust the level window automatically, what must I do to the
> metadata information?
> Is it necessary to calculate the maximum and minimum of the image and update
> the metada information?
>
> Thank you very much
> Aida
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers