Hi Aida,

    I don't know what could be the problem. I tested the code I sent
you using SandBox Plugin and it worked. If the block code that is
inside the "if conditional" is not executed, then maybe there is a
processor observer that adds the data to the rendering tree before
your function is executed. Could send me the source code to test it?

Best regards,
Xavi

2012/8/30 Aida Ninyerola <[email protected]>:
> Hi,
>
> I don't get any error. But it doesn't work, I still get different "colors"
> for the same image if I get it initialy or I change a parameter from my
> processor.
>
> I've checked step by step and I've found that it skips this if
>
>             if ( node.IsNotNull( ) && m_Processor->GetOutputDataEntity( num
> )->GetMTime( ) > m_Processor->GetOutputDataEntity( num )->GetRenderingData(
> "MITK")->GetMTime( ) )
>             {
>                 node->SetVisibility( false );
>                 node->GetPropertyList( )->DeleteProperty( "levelwindow" );
>             }
>
> Thank you very much
> Aida
>
> 2012/8/29 Xavi Planes <[email protected]>
>>
>> Hi Aida,
>>
>>     Sorry for the confusion, the sentence "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." is an explanation of the code I've sent you. You don't need to
>> add anything else.
>>
>>     What's the error you get?
>>
>>     How many output do you have? Maybe you need to use the code I sent
>> you for a specific output?
>>
>>     if ( num == 0 )
>>     {
>>         <code I've sent you>
>>     }
>>
>> Best regards,
>> Xavi
>>
>>
>> 2012/8/29 Aida Ninyerola <[email protected]>:
>> > Hi,
>> >
>> > As I have already changed the OnModifiedOutput function because I haver
>> > one
>> > personal working are and I needed to show different images in the
>> > different
>> > views, my OnModifiedOutput function is like this
>> >
>> > try
>> >     {
>> >         Core::Widgets::RenderWindowContainer* workingArea;
>> >         workingArea =
>> >
>> > dynamic_cast<Core::Widgets::RenderWindowContainer*>(GetPluginTab()->GetCurrentWorkingArea
>> > () );
>> >         //Before changing the active view, be sure that the index is
>> > below
>> > the number of views ( GetNumberOfWindows() ).
>> >         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" );
>> >         }
>> >         if (workingArea && workingArea ->GetNumberOfWindows() > 0 )
>> >         {
>> >             if (num<14)
>> >             {
>> >                 workingArea->SetActiveWindow(0);
>> >             }
>> >             else
>> >             {
>> >                 workingArea->SetActiveWindow(1);
>> >             }
>> >         }
>> >
>> >
>> >
>> > Core::DataTreeHelper::PublishOutput(m_Processor->GetOutputDataEntityHolder(
>> > num ), GetRenderingTree(), false, false );
>> >
>> >
>> > //Core::DataTreeHelper::PublishOutput(m_Processor->GetOutputDataEntityHolder(
>> > 0 ), GetRenderingTree( ) );
>> >         }
>> >
>> >
>> > coreCatchExceptionsReportAndNoThrowMacro("ResamplePanelWidget::OnModifiedInput"
>> > );
>> >
>> > I don't know if I have done something wrong as it doesn't work as I
>> > hope.
>> >
>> > I also haven't really understood this part you mentioned:
>> > 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.
>> >
>> > What must I do in the code to achieve this?
>> >
>> > 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

Reply via email to