Discussion:
problem with "refresh" in ImageWidget
Carlos Noriega
2011-12-13 23:14:55 UTC
Permalink
people:
when I open an image with the ImageWidget, it does not appear "clean", makes
them appear on the tools used above, explain:
I want to open a new image but do not inherit the design tool marks on it
(like cross section, average cross section). The example of this can
be seen with
the file simple_window.py

Carlos Noriega

LoB -Laboratory of Biophysics - USP

Av. Mello de Moraes, 65 CEP 05508-030 São Paulo/SP

University of São Paulo - Brazil

tlfn: 11-30918735 cel:11-69634011

E-mail: clnoriega-2SlJjJXS+***@public.gmane.org
Carlos Pascual
2011-12-15 14:22:49 UTC
Permalink
The following code shows what I think you want:

from PyQt4 import Qt
from numpy.random import rand
from guiqwt.plot import ImageWidget
from guiqwt.builder import make
app = Qt.QApplication([])
w=ImageWidget() # <---make sure you are not using ImageDialog !!!
w.get_plot().add_item(make.image(rand(10,10)))
w.show()
app.exec_()

(the result with guiqwt2.1.4 is as shown in the attached snapshot )
Post by Carlos Noriega
when I open an image with the ImageWidget, it does not appear "clean",
I want to open a new image but do not inherit the design tool marks on it
(like cross section, average cross section). The example of this can
be seen with
the file simple_window.py
Carlos Noriega
LoB -Laboratory of Biophysics - USP
Av. Mello de Moraes, 65 CEP 05508-030 São Paulo/SP
University of São Paulo - Brazil
tlfn: 11-30918735 cel:11-69634011
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
Carlos Pascual
2011-12-15 14:33:37 UTC
Permalink
Sorry, I think I misunderstood your question.
Ignore my previous reply.

I think that what you want to do is removing all items from the plot before
loading a new image (and possibly hide the cross section and contrast tools as
well). You can do this both from the gui (using the item list and the context
menu) or programatically (just give a look to the API docs).
Post by Carlos Pascual
from PyQt4 import Qt
from numpy.random import rand
from guiqwt.plot import ImageWidget
from guiqwt.builder import make
app = Qt.QApplication([])
w=ImageWidget() # <---make sure you are not using ImageDialog !!!
w.get_plot().add_item(make.image(rand(10,10)))
w.show()
app.exec_()
(the result with guiqwt2.1.4 is as shown in the attached snapshot )
Post by Carlos Noriega
when I open an image with the ImageWidget, it does not appear "clean",
I want to open a new image but do not inherit the design tool marks on it
(like cross section, average cross section). The example of this can
be seen with
the file simple_window.py
Carlos Noriega
LoB -Laboratory of Biophysics - USP
Av. Mello de Moraes, 65 CEP 05508-030 São Paulo/SP
University of São Paulo - Brazil
tlfn: 11-30918735 cel:11-69634011
--
+----------------------------------------------------+
Carlos Pascual Izarra
Scientific Software Coordinator
Computing Division
Cells / Alba Synchrotron [http:/www.cells.es]
Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3
E-08290 Cerdanyola del Valles (Barcelona), Spain
E-mail: cpascual-***@public.gmane.org
Phone: +34 93 592 4428
+----------------------------------------------------+
Loading...