Re: [Paraview] Please help!! How to force Render() from a reader

2009-10-26 Thread Olesen, Mark
Hi Takuya,

>   // 1. If one is happy with only updating the active view
>  if(this->view()) // may be null if no active view is present
>{
>this->view()->render();
>}

>  // 3. All views including irrelevant ones may be rendered by
>  pqApplicationCore::instance()->render();

Both of these work quite nicely for me. Thanks for the quick info!

/mark

This e-mail message and any attachments may contain legally privileged, 
confidential or proprietary Information, or information otherwise protected by 
law of EMCON Technologies, its affiliates, or third parties. This notice serves 
as marking of its "Confidential" status as defined in any confidentiality 
agreements concerning the sender and recipient. If you are not the intended 
recipient(s), or the employee or agent responsible for delivery of this message 
to the intended recipient(s), you are hereby notified that any dissemination, 
distribution or copying of this e-mail message is strictly prohibited. 
If you have received this message in error, please immediately notify the 
sender and delete this e-mail message from your computer.

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Please help!! How to force Render() from a reader

2009-10-23 Thread Takuya OSHIMA
Hi Mark,

Here are what I have tried within my custom reader panel (a subclass
of pqAutoGeneratedObjectPanel) so far and working fine for me. But I
may be wrong as Fabian reported the third one didn't for him.
( http://www.paraview.org/pipermail/paraview/2009-October/014074.html )

  // 1. If one is happy with only updating the active view
  if(this->view()) // may be null if no active view is present
{
this->view()->render();
}

  // 2. All relevant views may be rendered this way, where Ps is a
  // pqPipelineSource (a subclass of pqProxy) passed to the constructor
  // of the reader panel class
  this->Ps->renderAllViews();

  // 3. All views including irrelevant ones may be rendered by
  pqApplicationCore::instance()->render();

  // 4. Or there may be another way something like
  vtkSMProxyIterator *pIt = vtkSMProxyIterator::New();
  pIt->SetModeToOneGroup();
  for(pIt->Begin("views"); !pIt->IsAtEnd(); pIt->Next())
{
vtkSMViewProxy::SafeDownCast(pIt->GetProxy())->StillRender();
}
  pIt->Delete();

Takuya

Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN

From: "Olesen, Mark" 
Subject: RE: [Paraview] Please help!! How to force Render() from a reader
Date: Fri, 23 Oct 2009 02:25:54 +0200

> On a related tangent to the rendering issue:
> What method is needed to get the 3d view window to refresh.
> I have a customized reader panel with a few Qt checkboxes.
> When I select, for example, "Add Labels", the slot sends it to the server 
> manager and it is correctly updated.
> However, the text labels themselves don't appear in the window until I do 
> something else like resizing the window, clicking something, etc.
> 
> What method should be I using?
> 
> /mark
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Please help!! How to force Render() from a reader

2009-10-22 Thread Olesen, Mark
On a related tangent to the rendering issue:
What method is needed to get the 3d view window to refresh.
I have a customized reader panel with a few Qt checkboxes.
When I select, for example, "Add Labels", the slot sends it to the server 
manager and it is correctly updated.
However, the text labels themselves don't appear in the window until I do 
something else like resizing the window, clicking something, etc.

What method should be I using?

/mark

This e-mail message and any attachments may contain legally privileged, 
confidential or proprietary Information, or information otherwise protected by 
law of EMCON Technologies, its affiliates, or third parties. This notice serves 
as marking of its "Confidential" status as defined in any confidentiality 
agreements concerning the sender and recipient. If you are not the intended 
recipient(s), or the employee or agent responsible for delivery of this message 
to the intended recipient(s), you are hereby notified that any dissemination, 
distribution or copying of this e-mail message is strictly prohibited. 
If you have received this message in error, please immediately notify the 
sender and delete this e-mail message from your computer.

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Please help!! How to force Render() from a reader

2009-10-14 Thread Fabian Wein
Hi Takuya,

> Perhaps you are right in that you need a gui (client) part.
> (PV experts: correct me if I am wrong)
> 
>> Is there a complete code example anywhere?
> 
> Here is what I have in the gui (client) part for the "pesudo" live
> updating of my time-aware reader (I am using a QTimer for periodically
> polling a running case in a simple way). It's sort of brutal
> implementation though.
> 
> If you are intersted in the full version, have a look at
> http://openfoamwiki.net/index.php/Contrib_Parallelized_Native_OpenFOAM_Reader_for_ParaView


Thanks for the support. It helped! But due to time constraints I'll go
with the animator.

Cheers,

Fabian
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Please help!! How to force Render() from a reader

2009-10-14 Thread Takuya OSHIMA
Hi Fabian,

From: Fabian Wein 
Subject: Re: [Paraview] Please help!! How to force Render() from a reader
Date: Wed, 14 Oct 2009 10:26:09 +0200

> Hi Takuya,
> 
>> I am not sure what you mean by a thread (a client side code?),
>> but perhaps you can simply write
>> 
>>   pqApplicationCore::instance()->render();
> 
> This has no effect. Meanwhile I think this is because of the client/server
> structure.
> 
> Update within the reader forces RequestUpdateExtent and RequestData
> for the new time value - but it is not dispayed in the time GUI next
> to the
> VCR area.
> 
> A reader is a server part, isn't it? I guess I need also a gui part.

Perhaps you are right in that you need a gui (client) part.
(PV experts: correct me if I am wrong)

> 
> Is there a complete code example anywhere?

Here is what I have in the gui (client) part for the "pesudo" live
updating of my time-aware reader (I am using a QTimer for periodically
polling a running case in a simple way). It's sort of brutal
implementation though.

If you are intersted in the full version, have a look at
http://openfoamwiki.net/index.php/Contrib_Parallelized_Native_OpenFOAM_Reader_for_ParaView

  // only update pipeline information (RequestInformation())
  this->Sp->GetProperty("Refresh")->Modified();
  this->Sp->UpdatePipelineInformation();
  this->Sp->UpdatePropertyInformation(); // explicitly pull the property informa
tion

  // get the last timestep
  vtkSMDoubleVectorProperty *tsv
  = vtkSMDoubleVectorProperty::SafeDownCast(this->Sp->GetProperty("TimestepV
alues"));
  if(tsv->GetNumberOfElements() > 0)
{
const double lastStep = tsv->GetElement(tsv->GetNumberOfElements() - 1);
pqApplicationCore *app = pqApplicationCore::instance();

// set animation time to the last timestep
QList scenes
= app->getServerManagerModel()->findItems();
foreach (pqAnimationScene *scene, scenes)
  {
  scene->setAnimationTime(lastStep);
  }

if(this->Rescale->isChecked())
  {
  // rescale
  QList pipes
  = app->getServerManagerModel()->findItems(
);
  foreach (pqPipelineRepresentation *pipe, pipes)
{
pipe->resetLookupTableScalarRange();
}
  app->render();
  }
}

Regards,
Takuya

Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Please help!! How to force Render() from a reader

2009-10-14 Thread Fabian Wein
Hi Takuya,

> I am not sure what you mean by a thread (a client side code?),
> but perhaps you can simply write
> 
>   pqApplicationCore::instance()->render();

This has no effect. Meanwhile I think this is because of the client/server
structure.

Update within the reader forces RequestUpdateExtent and RequestData
for the new time value - but it is not dispayed in the time GUI next
to the
VCR area.

A reader is a server part, isn't it? I guess I need also a gui part.

Is there a complete code example anywhere?

Fabian
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


Re: [Paraview] Please help!! How to force Render() from a reader

2009-10-13 Thread Takuya OSHIMA
Hi Fabian,

I am not sure what you mean by a thread (a client side code?),
but perhaps you can simply write

  pqApplicationCore::instance()->render();

Regards,
Takuya

Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN


From: Fabian Wein 
Subject: [Paraview] Please help!! How to force Render() from a reader
Date: Tue, 13 Oct 2009 11:43:00 +0200

> Dear Kitware experts and users, :)
> 
> I'm still fighting with my live data reader and my deadline is
> approaching :(
> 
> In my vtkMultiBlockDataSetAlgorithm derived reader
> I implement
> 
> RequestInformation()
> RequestData()
> and
> RequestUpdateExtent()
> 
> and call Modfied() and Update() from a thread.
> Sofar all works, I trigger RequestUpdateExtent() for a valid
> time-value not
> read up to now. This time value is request by RequestData() and I return
> the new data - there is just no rendering.
> 
> I have no idea about how to force it.
> 
> Thank you very much!
> 
> Fabian Wein
> 
> ___
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ParaView Wiki at: 
> http://paraview.org/Wiki/ParaView
> 
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


[Paraview] Please help!! How to force Render() from a reader

2009-10-13 Thread Fabian Wein
Dear Kitware experts and users, :)

I'm still fighting with my live data reader and my deadline is
approaching :(

In my vtkMultiBlockDataSetAlgorithm derived reader
I implement

RequestInformation()
RequestData()
and
RequestUpdateExtent()

and call Modfied() and Update() from a thread.
Sofar all works, I trigger RequestUpdateExtent() for a valid
time-value not
read up to now. This time value is request by RequestData() and I return
the new data - there is just no rendering.

I have no idea about how to force it.

Thank you very much!

Fabian Wein

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview