Hi Aida,
Im happy that your code is working. Using the first parameter
(m_numCylinder), you can specify the output number. When the function
OnModifiedOutput( int num ) is called, this number is passed through the
variable "num". This is useful when the processor creates several outputs
and the observer function needs to identify each of these.
Best regards,
Xavi
From: Aida Ninyerola [mailto:[email protected]]
Sent: martes, 08 de mayo de 2012 16:56
To: Xavier Planes
Cc: [email protected]
Subject: Re: [Gimias-developers] configurating an standard working area
It worked! thank you very much
Now another question.. How am I saying the view I want to use when I am
using the UpdateOutput function?
One example of how am I using the UpdateOutput function is:
UpdateOutput(m_numCylinder,imageSuma , "ColapsedImage", true);
How is the num variable passed?
Thanks,
Aida
2012/5/8 Xavier Planes <[email protected]>
Hi Aida,
This error means that the compiler doesnt know what is
'RenderWindowContainer'. In order to show the compiler the definition of
this class, you should include the file coreRenderWindowContainer.h.
Best regards,
Xavi
From: Aida Ninyerola [mailto:[email protected]]
Sent: martes, 08 de mayo de 2012 15:34
To: Xavier Planes
Cc: [email protected]
Subject: Re: [Gimias-developers] configurating an standard working area
One of the errors I get is
error C2039: 'RenderWindowContainer' : no es un miembro de 'Core::Widgets'
thanks
aida
2012/5/8 Xavier Planes <[email protected]>
Hi Aida,
Yes, everything you did is perfect! What compilation errors
do you have?
Best regards,
Xavi
From: Aida Ninyerola [mailto:[email protected]]
Sent: martes, 08 de mayo de 2012 13:44
To: Xavier Planes
Cc: [email protected]
Subject: Re: [Gimias-developers] configurating an standard working area
Hi,
I've started to apply the changes you proposed but I'm doing something
wrong.
1. I've introduced this line GetProcessorOutputObserver( 0 )->SetEnable(
false ); in my OnInit function
2. I created the virtual void OnModifiedOutput( int num ); in my
PanelWidget, but in the .cpp file I got an error with the word virtual so I
wrote only void OnModifiedOutput( int num ).
3. Here I've my first question as I don't make my mind clear with all the
code and I've done something wrong as I get some errors during the
compilation. I think I haven't put the code in the correct place.
Where does the code to change the active view go?
4. I put this part in the OnModifiedOutput function where I supposed that
the 0 is the number of view where I wanted to show the image.
I also supposed that the OnModifiedOutput function is called when the
UpdateOutput is used. Is that right?
Sorry for all the questions and thank you for all your attention,
Aida
2012/5/8 Xavier Planes <[email protected]>
Hi Aida,
When a processor finishes the processing and calls UpdateOutput(),
the output DataEntity will automatically be added to the Data Tree and to
the active view. This default behavior is done by the class
ProcessorOutputObserver.
If you need to modify this default behavior, one possibility is to
avoid using the default Processor Observer and use your custom observer
function in your panel widget. In you function, you can easily change the
active view to the view0 and render the output data.
1. Avoid using the default Processor Observer: Add this line in your
OnInit() function:
GetProcessorOutputObserver( 0 )->SetEnable( false );
2. Add your custom observer function: Overwrite the base class
virtual function:
virtual void OnModifiedOutput( int num );
3. Change the active view:
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() ).
If (workingArea && workingArea ->GetNumberOfWindows() > 0 )
{
workingArea->SetActiveWindow(0);
}
4. Publish your output:
Core::DataTreeHelper::PublishOutput(
m_Processor->GetOutputDataEntityHolder( 0 ), GetRenderingTree() );
Best regards,
Xavi
From: Aida Ninyerola [mailto:[email protected]]
Sent: lunes, 07 de mayo de 2012 13:16
To: Xavier Planes
Cc: [email protected]
Subject: Re: [Gimias-developers] configurating an standard working area
Hi again,
I have a new question, this time related to the fact of how can I show
different images into different views.
In my Working Area there are two views (view0 and view1). I want some images
to be shown in view0 and some others in view1.
When I do the UpdateOutput it always shows the image into view1 as it's the
one that's selected. I would like to know how to change this in order to
show some of the images into view0.
I hope I've explained myself.
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