Hi Noelia,
I'm sorry about your problem. There's a mistake in the code I sent
you. In order to keep the rendering data and switch back to the initial
working area, you need to store the rendering tree as member variable of
your working area:
In your class:
Core::RenderingTreeMITK::Pointer m_RenderingTree;
In your constructor:
m_RenderingTree = Core::RenderingTreeMITK::New();
In your enable function:
if ( enable )
{
GetPluginTab()->GetRenderingTreeManager()->SetActiveTree(
m_RenderingTree.GetPointer() );
}
The problem was that the rendering data is deleted when you switch
back to the initial working area because a new rendering tree is created.
However, the ToolbarAppearance was holding a reference to the deleted
rendering data and it crashed.
Please let me know if this fixes your problem.
Best,
Xavi
-----Original Message-----
From: Noelia MartÃn Hernández [mailto:[email protected]]
Sent: miércoles, 13 de abril de 2011 11:22
To: Xavier Planes; [email protected]
Subject: Re: Signal working area
Hello Xavi.
Not if you remember the multiple rendering problem I had on configurating
the working area.
I created the following enable function in both panelWidget:
bool Preprocess_signal::Filter_Baseline_WanderPanelWidget::Enable( bool
enable /*= true */ ) {
bool bReturn =
Preprocess_signalFilter_Baseline_WanderPanelWidgetUI::Enable( enable );
// If this panel widget is selected -> Update the widget
if ( enable )
{
UpdateWidget();
Core::RenderingTreeMITK::Pointer tree =
Core::RenderingTreeMITK::New();
GetPluginTab()->GetRenderingTreeManager()->SetActiveTree(
tree.GetPointer() );
}
return bReturn;
}
In the other obviusly with the name Preprocess_signalPanelWidget.
If I put the enable in one of the panel widget and change to the other
works perfectly, but I can not return to the initial panel widget as is
logical, but it seems that I can not put the enable funcion in the two at a
time to pass from one to another without problem. if I do that I get the
error of screenshot. In the data tree when I check box jump the error.
Thanks.
On Mon, 11 Apr 2011, Xavier Planes wrote:
> Hi Noelia,
>
> Don't worry about your English, I can understand it perfectly and my
> English is not very good neither.
>
> The parent class is the same as the base class. You can search "base
> class c++" in Google to get further information. For example:
>
> class Car: public vehicle
> {
> protected:
> char type_of_fuel;
> public:
> Car();
> };
> The base class of Car is vehicle.
>
> To read more about C++ programming I recommend you to read the book
"
> The C+ + Programming Language (Bjarne Stroustrup)". You can find it if
> you search "c++ stroustrup pdf" in Google. In this book you will find
> the basic concepts of C++ language that will be very helpful for
developing in C++.
>
> Best,
> Xavi
>
> -----Original Message-----
> From: Noelia MartÃn Hernández [mailto:[email protected]]
> Sent: lunes, 11 de abril de 2011 13:46
> To: Xavier Planes
> Subject: Re: [cvremod-developers] Signal working area
>
> Ok, I will try to answer in English.
>
> Let's see if I understand correctly, I have to add a new method to my
> panelWidget including the code that I have indicated and stated in the
> course. H
>
> But not what you mean with this:
> / / Call the Enable function of the parent class
> bool result = ...
>
> What is my parent class?
>
> Thanks and sorry for my horrible English.
>
> On Mon, 11 Apr 2011, Xavier Planes wrote:
>
>> Hi Noelia,
>>
>> I will answer you in English and forward this email to the GIMIAS
>> mailing list, if it's ok with you. I think that your question is very
>> interesting to share with the rest of GIMIAS developers.
>>
>> To create the function Enable on a working area you need to add the
>> member function in your working area class
>> (Filter_Baseline_WanderPanelWidget):
>> bool Enable( bool enable = true );
>>
>> Inside this function you need to call the function Enable of the
>> superclass and add this code:
>> Void Preprocess_signal::Filter_Baseline_WanderPanelWidget::Enable(
>> bool enable /*=true*/)
>> {
>> // Call the Enable function of the parent class
>> bool result = ...
>>
>> If ( enable )
>> {
>> Core::RenderingTreeMITK::Pointer tree =
>> Core::RenderingTreeMITK::New();
>>
>> GetPluginTab()->GetRenderingTreeManager()->SetActiveTree(
>> tree.GetPointer() );
>> }
>>
>> return result;
>> }
>>
>> Best,
>> Xavi
>>
>> -----Original Message-----
>> From: Noelia MartÃn Hernández [mailto:[email protected]]
>> Sent: lunes, 11 de abril de 2011 11:19
>> To: Xavier Planes
>> Cc: [email protected]
>> Subject: RE: [cvremod-developers] Support Gimias
>>
>> Vale, creo que no se cual es la funcion enable de mi working area,
>> inclui el codigo que me indicaste en el panelwidget en el metodo de
>> OnModifiedOutput que es donde tengo puesta la configuracion de mi
>> Working Area del siguiente modo:
>>
>> void
>> Preprocess_signal::Filter_Baseline_WanderPanelWidget::OnModifiedOutpu
>> t
>> DataEn
>> tity()
>> {
>> try{
>>
>> if (m_Processor->GetOutputDataEntity(0).IsNotNull() )
>> {
>>
>> Core::RenderingTreeMITK::Pointer tree =
>> Core::RenderingTreeMITK::New();
>>
>> GetPluginTab()->GetRenderingTreeManager()->SetActiveTree(
>> tree.GetPointer() );
>>
>> Y me da el error que te envio en la screenshot, asique no se si es
>> aqui donde tengo que ponerlo o como...
>>
>> Gracias!
>>
>> On Fri, 8 Apr 2011, Xavier Planes wrote:
>>
>>> Hola Noelia,
>>>
>>> Para los dos problemas que me comentas, creo que hemos tenido un
>>> problema similar en otro plugin de señales. El problema consistía en
>>> que no había ningún rendering tree activo. Chiara puso la
>>> información necesaria en esta página:
>>>
>>> http://sourceforge.net/apps/mediawiki/gimias/index.php?title=HowToCr
>>> e a teNewW orkingArea#Another_Example_:_WorkingArea_with_plotWindow
>>>
>>> Este es el código que hay que poner en la función Enable de tu
>>> working área:
>>> Core::RenderingTreeMITK::Pointer tree =
>>> Core::RenderingTreeMITK::New();
>>> GetPluginTab()->GetRenderingTreeManager()->SetActiveTree(
>>> tree.GetPointer() );
>>>
>>> Si la working area no tiene ningún rendering tree activo, no se
>> podrá
>>> crear la "rendering data" de una señal. Este código solamente crea
>>> una rendering tree vacío para guardar los "rendering data" de las
> señales.
>>>
>>> Para obtener el nombre de las señales, yo probaría de imprimir por
>>> pantalla el nombre de la señal de input. La función
>>> blSignalCollective::Copy( ) sólo copia las variables miembro de una
>>> instancia a otra:
>>> std::cout << prep_signal->GetOutput()
>>>
>>> Gracias!
>>> Xavi
>>>
>>> -----Original Message-----
>>> From: [email protected]
>>> [mailto:[email protected]] On Behalf Of
>>> Noelia MartÃn Hernández
>>> Sent: jueves, 07 de abril de 2011 16:57
>>> To: Luigi Carotenuto
>>> Cc: [email protected]
>>> Subject: RE: [cvremod-developers] Support Gimias
>>>
>>> Hola, pues perfecto, empleare esta herramienta para comentar mis dudas.
>>>
>>> Tengo problemas a la hora de configurar el Working Area de mis Panel
>> Widget.
>>>
>>> Os comento tengo un plugin llamado Preprocess_signal que tiene dos
>>> panel
>>> Widget: Preprocess_signal y Filter_Baseline_Wander, en ambos realizo
>>> una configuracin del Working Area para mostrar varias seales en los
>>> mismo ejes y funciona segun las condiciones.
>>>
>>> Tengo dos problemas:
>>>
>>> 1.- Si cargo el Working Area del Panel Widget Preprocess_signal y
>>> luego cargo con View/Working Area/ Filter_Baseline_WanderPanelWidget
>>> funcionan ambos sin problemas, pero si una vez hecho esto, intento
>>> volver a cargar el primer Widget, el de Preprocess_signal o
>>> partiendo del Baseline_Wander voy al Preprocess_signal parece que
>>> desaparecen los datos del Data Tree.
>>>
>>> Estan los dataEntity, pero sin seleccionar y si intento cargarlos o
>>> seleccionarlos me salta un error de lectura, envio una screenshot
>>> del error que me salta. Creo que es algun error de
>>> multirenderizacion o algo asi pero no se como solucionarlo, y para
>>> el caso de Preprocess_signal no me pasa esto.
>>>
>>> 2.- Las entradas para mis Panel Widget son blsignalcollective
>>> formadas por una o varias blsignal, y me ocurre lo siguiente:
>>>
>>> - Si cargo una blsignalcollective de una unica blsignal y luego una
>>> de varias funcionan ambas bien, pero al intentar volver a cargar una
>>> blsignalcollective de una unica blsignal en el DataEntity del Data
>>> Tree de salida no se ve nada, desaparece cualquier dato. Aunque en
>>> el working area se ven los datos bien. Tambien mando una screenshot
>>> de como
>> queda.
>>>
>>> - Si cargo primero una blsignalcollective de varias y luego una de
>>> una unica blsignal tambien funcionan las dos, pero al intentar
>>> cargar la de varias desaparecen los datos del DataEntity, como antes.
>>>
>>> Agradeceria que me informaseis como puedo solucionarlo.
>>>
>>> Gracias. Noelia.
>>>
>>>
>>> On Thu, 7 Apr 2011, Luigi Carotenuto wrote:
>>>
>>>> Hola Noelia,
>>>> La lista de correo es la mejor manera para contactar con nosotros.
>>>> Estamos
>>> intentando distribuir el soporte por temas asm que no haya un
>>> encargado para todo si no una persona para cada tema y/o usuario.
>>> Entonces, si envmas tus dudas a la lista intentaremos distribuirlas
>>> entre los que puedan ayudarte mas y ellos contestaran directamente a
>>> la lista o te contactaran personalmente si las dudas no son tan
> generales.
>>>>
>>>> Gracias y saludos,
>>>> Luigi
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: [email protected]
>>>> [mailto:[email protected]] On Behalf Of
>>>> [email protected]
>>>> Sent: jueves, 07 de abril de 2011 12:31
>>>> To: [email protected]
>>>> Subject: [cvremod-developers] Support Gimias
>>>>
>>>>
>>>> Hola.
>>>>
>>>> Me gustaria saber quien es el nuevo encargado del Support de
>>>> Gimias,
>>>
>>>> y como puedo contactar con el o ella, ya sea por la lista de
>>>> correo, correo personal o por el skype.
>>>>
>>>> Gracias y un saludo!
>>>> _______________________________________________
>>>> cvremod-developers mailing list
>>>> [email protected]
>>>> http://cilab.upf.edu:81/mailman/listinfo/cvremod-developers
>>>>
>>>> _______________________________________________
>>>> cvremod-developers mailing list
>>>> [email protected]
>>>> http://cilab.upf.edu:81/mailman/listinfo/cvremod-developers
>>>>
>>>
>>>
>>> _______________________________________________
>>> cvremod-developers mailing list
>>> [email protected]
>>> http://cilab.upf.edu:81/mailman/listinfo/cvremod-developers
>>>
>>
>>
>> _______________________________________________
>> cvremod-developers mailing list
>> [email protected]
>> http://cilab.upf.edu:81/mailman/listinfo/cvremod-developers
>>
>
>
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers