Skip to content
Snippets Groups Projects
Commit 1a79de06 authored by valerio's avatar valerio
Browse files

Removed references to iplt from the website

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1756 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent e58f4216
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ OpenStructure uses a bunch of OpenSource libraries. If you haven't already insta ...@@ -15,7 +15,7 @@ OpenStructure uses a bunch of OpenSource libraries. If you haven't already insta
* [Python](http://python.org) * [Python](http://python.org)
* [Qt](http://qt.nokia.com/) * [Qt](http://qt.nokia.com/)
When you enable IPLT support, you will need: When you enable support for image processing, you will need:
* [FFTW3](http://fftw.org). By default, OpenStructure is compiled with single precision and thus also requires FFTW to be compiled with single precision. Most platforms offer this as a second package. If you are compiling manually, use the `--enable-single` option. * [FFTW3](http://fftw.org). By default, OpenStructure is compiled with single precision and thus also requires FFTW to be compiled with single precision. Most platforms offer this as a second package. If you are compiling manually, use the `--enable-single` option.
...@@ -75,7 +75,7 @@ By default, [CMake] searches the standard directories for dependencies. However, ...@@ -75,7 +75,7 @@ By default, [CMake] searches the standard directories for dependencies. However,
### Flags that control the build ### Flags that control the build
* `ENABLE_UI` controls whether to build the graphical user interface module. By default it is set to true. * `ENABLE_UI` controls whether to build the graphical user interface module. By default it is set to true.
* `ENABLE_IPLT` controls whether to build the image processing module. This will enable support for density maps, and general image processing in 1, 2 an 3 dimensions. By default it is set to true. * `ENABLE_IMG` controls whether to build the image processing module. This will enable support for density maps, and general image processing in 1, 2 an 3 dimensions. By default it is set to true.
* `ENABLE_GFX` controls whether to build the graphics module. By default, this is set to true. If set to none, this implies `ENABLE_UI=NO`. * `ENABLE_GFX` controls whether to build the graphics module. By default, this is set to true. If set to none, this implies `ENABLE_UI=NO`.
* Shader support is controlled with `USE_SHADER`. By default, no shaders are used. * Shader support is controlled with `USE_SHADER`. By default, no shaders are used.
* If `OPTIMIZE` is set to 1, an optimized version of OpenStructure is built. * If `OPTIMIZE` is set to 1, an optimized version of OpenStructure is built.
......
File moved
File moved
File moved
...@@ -11,9 +11,9 @@ To allow various image manipulation routines that are decoupled from the actual ...@@ -11,9 +11,9 @@ To allow various image manipulation routines that are decoupled from the actual
image implementations, an extensive set of algorithm base classes is provided to facilitate image implementations, an extensive set of algorithm base classes is provided to facilitate
the implementation of novel algorithms. the implementation of novel algorithms.
The 'iplt' module is using the concept of algorithm objects: In order to apply an algorithm The 'img' module is using the concept of algorithm objects: In order to apply an algorithm
to an image, an instance of that particular algorithm class must be created, which to an image, an instance of that particular algorithm class must be created, which
is then passed to one of the various Apply methods of the dox[ost::iplt::ImageHandle|ImageHandle] is then passed to one of the various Apply methods of the dox[ost::img::ImageHandle|ImageHandle]
interface. This extends the possibilities of algorithms beyond what is possible with simple interface. This extends the possibilities of algorithms beyond what is possible with simple
function calls. function calls.
...@@ -23,36 +23,36 @@ Five different types of algorithms can be identified: ...@@ -23,36 +23,36 @@ Five different types of algorithms can be identified:
### NonMod ### NonMod
An algorithm that will not modify the values in the image, but rather gather An algorithm that will not modify the values in the image, but rather gather
some data. Example: a histogram. Implemented as dox[ost::iplt::NonModAlgorithm|NonModAlgorithm]. some data. Example: a histogram. Implemented as dox[ost::img::NonModAlgorithm|NonModAlgorithm].
### ModIP ### ModIP
An algorithm that will modify the image values directly in place; in addition, An algorithm that will modify the image values directly in place; in addition,
it may choose to write to its internal state during application of the algorithm. it may choose to write to its internal state during application of the algorithm.
Implemented as dox[ost::iplt::ModIPAlgorithm|ModIPAlgorithm]. Implemented as dox[ost::img::ModIPAlgorithm|ModIPAlgorithm].
### ConstModIP ### ConstModIP
Similar to ModIP, this algorithm will modify the values directly in place. Similar to ModIP, this algorithm will modify the values directly in place.
However, it does not need to store information itself beyond the application of the algorithm However, it does not need to store information itself beyond the application of the algorithm
itself. Example: setting all image values to zero. Implemented as itself. Example: setting all image values to zero. Implemented as
dox[ost::iplt::ConstModIPAlgorithm|ConstModIPAlgorithm]. dox[ost::img::ConstModIPAlgorithm|ConstModIPAlgorithm].
### ModOP ### ModOP
An algorithm that will return a new, modified version of the image, while An algorithm that will return a new, modified version of the image, while
leaving the original untouched. Again, the algorithm can store information to be available leaving the original untouched. Again, the algorithm can store information to be available
after it has been applied. Implemented as dox[ost::iplt::ModOPAlgorithm|ModOPAlgorithm]. after it has been applied. Implemented as dox[ost::img::ModOPAlgorithm|ModOPAlgorithm].
### ConstModOP ### ConstModOP
Similar to ModOP, except that no information can be stored beyond the Similar to ModOP, except that no information can be stored beyond the
application of the algorithm itself. Example: rotation around an arbitrary angle. Implemented application of the algorithm itself. Example: rotation around an arbitrary angle. Implemented
as dox[ost::iplt::ConstModOPAlgorithm|ConstModOPAlgorithm]. as dox[ost::img::ConstModOPAlgorithm|ConstModOPAlgorithm].
## Custom Algorithms ## Custom Algorithms
Writing custom algorithms for the 'iplt' module is fairly straightforward, in view of the fact that the final Writing custom algorithms for the 'img' module is fairly straightforward, in view of the fact that the final
algorithm will integrate seamlessly into the build environment, both at the C++ and Python runtime algorithm will integrate seamlessly into the build environment, both at the C++ and Python runtime
levels. Information on how to write custom algorithms can be found at the levels. Information on how to write custom algorithms can be found at the
[Algorithm Tutorial page](docs/tut/ipltalgdata.html). [Algorithm Tutorial page](docs/tut/imgalgdata.html).
There are two fundamental types of algorithms, those that operate on high level There are two fundamental types of algorithms, those that operate on high level
ImageHandle instances, [Data Algorithms](docs/tut/ipltalgdata.html), and those that ImageHandle instances, [Data Algorithms](docs/tut/imgalgdata.html), and those that
operate on the low level ImageState instances, [ImageState Algorithms](docs/tut/ipltalgdistate.html). operate on the low level ImageState instances, [ImageState Algorithms](docs/tut/imgalgdistate.html).
...@@ -4,7 +4,7 @@ title: Data Algorithms - An Algorithm Tutorial ...@@ -4,7 +4,7 @@ title: Data Algorithms - An Algorithm Tutorial
# Data Algorithms - An Algorithm Tutorial # Data Algorithms - An Algorithm Tutorial
This tutorial shows how to create custom high level dox[ost::iplt::ImageHandle|ImageHandle] algorithms and This tutorial shows how to create custom high level dox[ost::img::ImageHandle|ImageHandle] algorithms and
embed them into the OpenStructure build system. As an example, two very simple algorithm will be written: embed them into the OpenStructure build system. As an example, two very simple algorithm will be written:
The first will count all values in an image or function that are larger than a certain threshold. Since this The first will count all values in an image or function that are larger than a certain threshold. Since this
algorithm only needs to read values, it will be implemented by deriving it from ConstAlgorithm. The second algorithm algorithm only needs to read values, it will be implemented by deriving it from ConstAlgorithm. The second algorithm
...@@ -102,14 +102,14 @@ algorithm needs to be included from its header. These are the two 'include' ...@@ -102,14 +102,14 @@ algorithm needs to be included from its header. These are the two 'include'
statements we want to add, along with the 'namespace' code: statements we want to add, along with the 'namespace' code:
:::cpp :::cpp
#include <ost/iplt/image.hh> #include <ost/img/image.hh>
#include <ost/thres/thres_count.hh> #include <ost/thres/thres_count.hh>
using namespace ost::iplt; using namespace ost::img;
using namespace ost::thres; using namespace ost::thres;
The first 'include' line and the 'ost::iplt' 'namespace' directive are needed The first 'include' line and the 'ost::img' 'namespace' directive are needed
for creating and handling an ImageHandle. They use elements which are part of for creating and handling an ImageHandle. They use elements which are part of
the standard OpensStructure distribution. The others lines are required for our the standard OpensStructure distribution. The others lines are required for our
particular algorithm class. particular algorithm class.
...@@ -126,7 +126,7 @@ to be created, with which the functionality of the algorithm can be tested: ...@@ -126,7 +126,7 @@ to be created, with which the functionality of the algorithm can be tested:
ImageHandle ih = CreateImage(Extent((Size(4,4)))); ImageHandle ih = CreateImage(Extent((Size(4,4))));
The factory method CreateImage() from the standard OpenStructure The factory method CreateImage() from the standard OpenStructure
distribution takes care of this. The dox[ost::iplt::ImageHandle|ImageHandle] distribution takes care of this. The dox[ost::img::ImageHandle|ImageHandle]
'ih' now referes to a 4x4 real, spatial image, with all values set to zero. To 'ih' now referes to a 4x4 real, spatial image, with all values set to zero. To
populate the image with values, the following code is used: populate the image with values, the following code is used:
...@@ -146,7 +146,7 @@ Note ...@@ -146,7 +146,7 @@ Note
threshold, and it makes only sense that this threshold is given upon instantiation; threshold, and it makes only sense that this threshold is given upon instantiation;
we will need to remember this once we implement the constructor. we will need to remember this once we implement the constructor.
As the next step, the algorithm is applied to the image, using the appropriate As the next step, the algorithm is applied to the image, using the appropriate
method from dox[ost::iplt::ImageHandle|ImageHandle]: method from dox[ost::img::ImageHandle|ImageHandle]:
:::cpp :::cpp
ih.Apply(a); ih.Apply(a);
...@@ -170,9 +170,9 @@ Here is the finished file 'test\_thres\_count.cc'. ...@@ -170,9 +170,9 @@ Here is the finished file 'test\_thres\_count.cc'.
:::cpp :::cpp
#include "test_thres_count.hh" #include "test_thres_count.hh"
#include <ost/iplt/image.hh> #include <ost/img/image.hh>
#include <ost/thres_count.hh> #include <ost/thres_count.hh>
using namespace ost::iplt; using namespace ost::img;
using namespace ost::thres; using namespace ost::thres;
namespace test_thres_count { namespace test_thres_count {
...@@ -238,9 +238,9 @@ Here is the final test file 'test\_thres\_set'.cc: ...@@ -238,9 +238,9 @@ Here is the final test file 'test\_thres\_set'.cc:
:::cpp :::cpp
#include "test_thres_set.hh" #include "test_thres_set.hh"
#include <ost/iplt/image.hh> #include <ost/img/image.hh>
#include <ost/thres/thres_set.hh> #include <ost/thres/thres_set.hh>
using namespace ost::iplt; using namespace ost::img;
using namespace ost::thres; using namespace ost::thres;
namespace test_thres_set { namespace test_thres_set {
...@@ -277,7 +277,7 @@ Here is the final test file 'test\_thres\_set'.cc: ...@@ -277,7 +277,7 @@ Here is the final test file 'test\_thres\_set'.cc:
Obviously, all files need to be added to the 'CMakeLists.txt' file in 'thres/tests.' Obviously, all files need to be added to the 'CMakeLists.txt' file in 'thres/tests.'
Also, all the module dependencies must be added. In our example the dependencies are Also, all the module dependencies must be added. In our example the dependencies are
the 'ost\_iplt' and 'ost\_iplt\_alg' module, plus the 'ost\_thres' moudle itself. the 'ost\_img' and 'ost\_img\_alg' module, plus the 'ost\_thres' moudle itself.
## Coding Algorithm ## Coding Algorithm
...@@ -293,7 +293,7 @@ Here is 'thres\_count.hh: ...@@ -293,7 +293,7 @@ Here is 'thres\_count.hh:
#ifndef OST_TRES_THRES_COUNT_H #ifndef OST_TRES_THRES_COUNT_H
#define OST_TRES_THRES_COUNT_H #define OST_TRES_THRES_COUNT_H
#include <ost/iplt/algorithm.hh> #include <ost/img/algorithm.hh>
namespace ost { namespace thres { namespace ost { namespace thres {
...@@ -326,7 +326,7 @@ And here is 'thres\_count.cc': ...@@ -326,7 +326,7 @@ And here is 'thres\_count.cc':
:::cpp :::cpp
#include "thres_count.hh" #include "thres_count.hh"
using namespace ost::iplt; using namespace ost::img;
using namespace ost::thres; using namespace ost::thres;
ThresCount::ThresCount(Real thres): ThresCount::ThresCount(Real thres):
...@@ -363,7 +363,7 @@ And here is 'thres\_count.cc': ...@@ -363,7 +363,7 @@ And here is 'thres\_count.cc':
} }
Note Note
: The polymorphic separation into 'dox[ost::iplt::ConstImageHandle|ConstImageHandle]' and : The polymorphic separation into 'dox[ost::img::ConstImageHandle|ConstImageHandle]' and
'Function' is not utilized in this example, since both 'Visit()' methods just call 'Function' is not utilized in this example, since both 'Visit()' methods just call
'VisitData()' to perform the actual calculation. The method body of 'VisitData()' 'VisitData()' to perform the actual calculation. The method body of 'VisitData()'
is the actual algorithm implementation, using the private member variables 'thres\_' is the actual algorithm implementation, using the private member variables 'thres\_'
...@@ -375,7 +375,7 @@ Here is the 'thres\_set.hh' file: ...@@ -375,7 +375,7 @@ Here is the 'thres\_set.hh' file:
#ifndef OST_THRES_THRES_SET_H #ifndef OST_THRES_THRES_SET_H
#define OST_THRES_THRES_SET_H #define OST_THRES_THRES_SET_H
#include <ost/iplt/algorithm.hh> #include <ost/img/algorithm.hh>
namespace ost { namespace thres { namespace ost { namespace thres {
...@@ -401,7 +401,7 @@ And here is 'thres_set.cc': ...@@ -401,7 +401,7 @@ And here is 'thres_set.cc':
:::cpp :::cpp
#include "thres_set.hh" #include "thres_set.hh"
using namespace ost::iplt; using namespace ost::img;
using namespace ost::thres; using namespace ost::thres;
ThresSet::ThresSet(Real thres): ThresSet::ThresSet(Real thres):
...@@ -420,8 +420,8 @@ And here is 'thres_set.cc': ...@@ -420,8 +420,8 @@ And here is 'thres_set.cc':
Once again, all the files must be added to the 'CMakeLists.txt' file, this time in Once again, all the files must be added to the 'CMakeLists.txt' file, this time in
'thres/src'. This will make sure that all the headers and the newly created shared libraries 'thres/src'. This will make sure that all the headers and the newly created shared libraries
are staged correctly. The 'DEPENDS ON' directive in the file should include the 'iplt' are staged correctly. The 'DEPENDS ON' directive in the file should include the 'img'
and 'iplt_alg' modules, since those are the modules 'thres' depends on. and 'img_alg' modules, since those are the modules 'thres' depends on.
## Python Wrapper ## Python Wrapper
...@@ -435,7 +435,7 @@ the 'thres' module. Let's put the following 'wrap\_thres.cc' file in the 'src/py ...@@ -435,7 +435,7 @@ the 'thres' module. Let's put the following 'wrap\_thres.cc' file in the 'src/py
#include <ost/thres/thres_count.hh> #include <ost/thres/thres_count.hh>
#include <ost/thres/thres_set.hh> #include <ost/thres/thres_set.hh>
using namespace ost::iplt; using namespace ost::img;
using namespace ost::thres; using namespace ost::thres;
BOOST_PYTHON_MODULE(_tres) BOOST_PYTHON_MODULE(_tres)
......
...@@ -39,7 +39,7 @@ This is an example of a NonMod algorithm ...@@ -39,7 +39,7 @@ This is an example of a NonMod algorithm
// entry point for image state visitor // entry point for image state visitor
template<typename T, class D> template<typename T, class D>
void VisitState(const iplt::image_state::ImageStateImpl<T,D>& isi); void VisitState(const img::image_state::ImageStateImpl<T,D>& isi);
// entry point for function visitor // entry point for function visitor
void VisitFunction(const Funcion& f); void VisitFunction(const Funcion& f);
......
...@@ -9,7 +9,7 @@ title: Data Viewer ...@@ -9,7 +9,7 @@ title: Data Viewer
The Data Viewer can display a single real or reciprocal space image with adjustable The Data Viewer can display a single real or reciprocal space image with adjustable
contrast. Phases in reciprocal space images can be visualized using the phase color mode. contrast. Phases in reciprocal space images can be visualized using the phase color mode.
The data viewer can be created and also be controlled via the Python/C++ interface. The data viewer can be created and also be controlled via the Python/C++ interface.
Extension of the data viewer is possible using additional [overlays](docs/tut/ipltoverlays.html). Extension of the data viewer is possible using additional [overlays](docs/tut/imgoverlays.html).
The DataViewer shows several panels. In each several actions can be performed using The DataViewer shows several panels. In each several actions can be performed using
the keyboard and mouse interface, as described below. A status bar is also present in the keyboard and mouse interface, as described below. A status bar is also present in
...@@ -114,7 +114,7 @@ Following python code loads an image and creates a new viewer for it. ...@@ -114,7 +114,7 @@ Following python code loads an image and creates a new viewer for it.
im=io.LoadImage("...") im=io.LoadImage("...")
v=gui.GostyApp.Instance().CreateDataViewer(im) v=gui.GostyApp.Instance().CreateDataViewer(im)
The viewer instance v provides following methods. See the dox[ost::iplt::gui::DataViewer|DataViewer] The viewer instance v provides following methods. See the dox[ost::img::gui::DataViewer|DataViewer]
class documentation. class documentation.
...@@ -7,8 +7,8 @@ title: Images / Density Maps - An Introduction ...@@ -7,8 +7,8 @@ title: Images / Density Maps - An Introduction
## Introduction : The ImageHandle ## Introduction : The ImageHandle
OpenStructure offers extensive processing capabilities for planar 2d images and OpenStructure offers extensive processing capabilities for planar 2d images and
3d maps using the iplt module. Images are manipulated through the use of 3d maps using the img module. Images are manipulated through the use of
dox[ost::iplt::ImageHandle|ImageHandles]. dox[ost::img::ImageHandle|ImageHandles].
ImageHandles provide a clean and efficient interface to interact ImageHandles provide a clean and efficient interface to interact
with images and maps. An ImageHandle can store an image in either real with images and maps. An ImageHandle can store an image in either real
...@@ -35,7 +35,7 @@ to 0. ...@@ -35,7 +35,7 @@ to 0.
As a first step, enter the following lines in the OpenStructure python console: As a first step, enter the following lines in the OpenStructure python console:
:::python :::python
im=iplt.CreateImage(iplt.Size(200,200)) im=img.CreateImage(img.Size(200,200))
This will create an empty, 2D image, with a height and width of 200 pixels, whose This will create an empty, 2D image, with a height and width of 200 pixels, whose
...@@ -52,7 +52,7 @@ The inner area of the white frame is the image, which is empty. ...@@ -52,7 +52,7 @@ The inner area of the white frame is the image, which is empty.
Let us fill the image with random values. Let us fill the image with random values.
:::python :::python
rand_alg = iplt.alg.Randomize() # create algorithm object rand_alg = img.alg.Randomize() # create algorithm object
im.ApplyIP( rand_alg ) # apply algorithm object in-place im.ApplyIP( rand_alg ) # apply algorithm object in-place
As you can see, applying an algorithm is conceptually a two-step process. First, As you can see, applying an algorithm is conceptually a two-step process. First,
...@@ -66,7 +66,7 @@ Now that we have some (noisy) data present, let us run another algorithm, this t ...@@ -66,7 +66,7 @@ Now that we have some (noisy) data present, let us run another algorithm, this t
a Gaussian filter with a sigma of 4 pixel. a Gaussian filter with a sigma of 4 pixel.
:::python :::python
im.ApplyIP( iplt.alg.GaussianFilter(4.0) ) # apply temporary algorithm object in-place im.ApplyIP( img.alg.GaussianFilter(4.0) ) # apply temporary algorithm object in-place
As you can see, it is not always necessary to create an independent algorithm instance first, As you can see, it is not always necessary to create an independent algorithm instance first,
in many cases a temporary object will suffice (this applies to the randomization in many cases a temporary object will suffice (this applies to the randomization
...@@ -76,7 +76,7 @@ is applied. This can be important if the algorithm stores some values that need ...@@ -76,7 +76,7 @@ is applied. This can be important if the algorithm stores some values that need
recovered later. For example: recovered later. For example:
:::python :::python
stat=iplt.alg.Stat() stat=img.alg.Stat()
im.ApplyIP(stat) im.ApplyIP(stat)
mean=stat.GetMean() mean=stat.GetMean()
...@@ -89,17 +89,17 @@ information would be lost. ...@@ -89,17 +89,17 @@ information would be lost.
## Applying a Fourier Transform ## Applying a Fourier Transform
An image is Fourier-transformed using the 'iplt.alg.FFT()' algorithm object: An image is Fourier-transformed using the 'img.alg.FFT()' algorithm object:
:::python :::python
im=io.LoadImage("imagename.tif") # load the image im=io.LoadImage("imagename.tif") # load the image
# create an instance of the fft algorithm object # create an instance of the fft algorithm object
fft=iplt.alg.FFT() fft=img.alg.FFT()
# do the actual Fourier transformation # do the actual Fourier transformation
im_ft=im.Apply(fft) im_ft=im.Apply(fft)
# back-transform # back-transform
im2 = im_ft.Apply(fft) im2 = im_ft.Apply(fft)
# if this is run from within giplt, open viewers to look at the images # if this is run from within the dng graphical frontend, open viewers to look at the images
gui.CreateDataViewer(im) gui.CreateDataViewer(im)
gui.CreateDataViewer(im_ft) gui.CreateDataViewer(im_ft)
gui.CreateDataViewer(im2) gui.CreateDataViewer(im2)
...@@ -128,9 +128,9 @@ An image can be extracted and pasted into another image using the 'Extract()' an ...@@ -128,9 +128,9 @@ An image can be extracted and pasted into another image using the 'Extract()' an
# load the image # load the image
im=io.LoadImage("imagename.tif") im=io.LoadImage("imagename.tif")
# generate a subimage from the region going from (10,10) to (30,30) # generate a subimage from the region going from (10,10) to (30,30)
im2=im.Extract(iplt.Extent(iplt.Point(10,10),iplt.Point(30,30))) im2=im.Extract(img.Extent(img.Point(10,10),img.Point(30,30)))
# generate an empty image with the same size as the original image # generate an empty image with the same size as the original image
im3=iplt.CreateImage(im.GetExtent()) im3=img.CreateImage(im.GetExtent())
# paste the subimage into the empty image # paste the subimage into the empty image
im3.Paste(im2) im3.Paste(im2)
...@@ -142,7 +142,7 @@ region where the pasted-to and the pasted-in image overlap will be affected. ...@@ -142,7 +142,7 @@ region where the pasted-to and the pasted-in image overlap will be affected.
| | | | | | | |
|:-------------------------------------------------:|:-------------------------------------------------------------------:|:------------------------------------------------------------------------:| |:-------------------------------------------------:|:-------------------------------------------------------------------:|:------------------------------------------------------------------------:|
|![Empty Image] (docs/tut/giplt1.jpg "Empty Image") | ![After Randomization] (docs/tut/giplt2.jpg "After Randomization") | ![After Gaussian Filtering] (docs/tut/giplt3.jpg "After Randomization") | |![Empty Image] (docs/tut/dv1.jpg "Empty Image") | ![After Randomization] (docs/tut/dv2.jpg "After Randomization") | ![After Gaussian Filtering] (docs/tut/dv3.jpg "After Randomization") |
|Empty Image | After Randomization | After Gaussian Filtering | |Empty Image | After Randomization | After Gaussian Filtering |
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Overlays # Overlays
The DataViewer may be extended by an arbitrary amount overlays. These are The DataViewer may be extended by an arbitrary amount overlays. These are
classes derived from 'ost::iplt::gui::Overlay', either directly in Python or classes derived from 'ost::img::gui::Overlay', either directly in Python or
written in C++ and then exported to Python. They are added dynamically to each written in C++ and then exported to Python. They are added dynamically to each
viewer by means of the DataViewer::AddOverlay method. viewer by means of the DataViewer::AddOverlay method.
...@@ -15,7 +15,7 @@ is given below, and can also be found in `modules/gui/src/data_viewer/null_overl ...@@ -15,7 +15,7 @@ is given below, and can also be found in `modules/gui/src/data_viewer/null_overl
:::cpp :::cpp
#include <ost/gui/data_viewer/overlay_base.hh> #include <ost/gui/data_viewer/overlay_base.hh>
class NullOverlay: public ost::iplt::gui::Overlay class NullOverlay: public ost::img::gui::Overlay
{ {
public: public:
// the ctor must initialize the Overlay base class with a name // the ctor must initialize the Overlay base class with a name
...@@ -31,7 +31,7 @@ is given below, and can also be found in `modules/gui/src/data_viewer/null_overl ...@@ -31,7 +31,7 @@ is given below, and can also be found in `modules/gui/src/data_viewer/null_overl
// This method is called for each redraw of the image viewer, after the image itself // This method is called for each redraw of the image viewer, after the image itself
// has been rendered in the view widget. The device context as well as the data viewer // has been rendered in the view widget. The device context as well as the data viewer
// panel are passed // panel are passed
virtual void OnDraw(wxDC& dc, const iplt::gui::DataViewerPanel* dvp, bool is_active) virtual void OnDraw(wxDC& dc, const img::gui::DataViewerPanel* dvp, bool is_active)
{ {
} }
......
...@@ -96,7 +96,7 @@ The use XCSEditor and ICSEditor are mutually exlusive. This means that whenever ...@@ -96,7 +96,7 @@ The use XCSEditor and ICSEditor are mutually exlusive. This means that whenever
In this exercise you will learn how to do basic processing of density map data. For the exercise you will use real experimental data coming from a single particle reconstruction of the YscC protein from Yersinia entercolitica. In this exercise you will learn how to do basic processing of density map data. For the exercise you will use real experimental data coming from a single particle reconstruction of the YscC protein from Yersinia entercolitica.
The first step to the processing of density data in OpenStructure is the loading of the ‘iplt’ and ‘iplt.alg’ module. The first step to the processing of density data in OpenStructure is the loading of the ‘img’ and ‘img.alg’ module.
Go ahead and load the module in the OpenStructure python shell. Go ahead and load the module in the OpenStructure python shell.
The second step consists in loading the density data into memory. OpenStructure provides a LoadMap function in the ‘io’ module that can be used, not surprisingly, to load a density map. The second step consists in loading the density data into memory. OpenStructure provides a LoadMap function in the ‘io’ module that can be used, not surprisingly, to load a density map.
...@@ -122,15 +122,15 @@ You will notice that the GetSpatialSampling method shows that the map has a pixe ...@@ -122,15 +122,15 @@ You will notice that the GetSpatialSampling method shows that the map has a pixe
The map is way too large to be manipulated and visualized comfortably. Since the data have low resolution anyway, we will shrink the map using the DiscreteShrink algorithm. The map is way too large to be manipulated and visualized comfortably. Since the data have low resolution anyway, we will shrink the map using the DiscreteShrink algorithm.
First, go ahead and import the `iplt.alg` module. First, go ahead and import the `img.alg` module.
Then let’s create an instance of the DiscreteShrink algorithm. Let’s pass it a size parameter of 4x4x4. The map will be shrunk by a factor of 4 in all directions. Then let’s create an instance of the DiscreteShrink algorithm. Let’s pass it a size parameter of 4x4x4. The map will be shrunk by a factor of 4 in all directions.
Let’s now apply the algorithm to the map. We apply it in place, because we want to overwrite the original data Let’s now apply the algorithm to the map. We apply it in place, because we want to overwrite the original data
map.ApplyIP(shrink_alg)Now go ahead and try to recover the information about the spatial sampling from the map. Verify that the pixel sampling has been adjusted to reflect the shrinking. map.ApplyIP(shrink_alg)Now go ahead and try to recover the information about the spatial sampling from the map. Verify that the pixel sampling has been adjusted to reflect the shrinking.
shrink_alg=iplt.alg.DiscreteShrink(iplt.Size(4,4,4)) shrink_alg=img.alg.DiscreteShrink(img.Size(4,4,4))
Now, let’s use another algorithm to normalize the density values of the map between the 0 and 1 Now, let’s use another algorithm to normalize the density values of the map between the 0 and 1
norm=iplt.alg.CreateLinearRangeNormalizer(map,0.0,1.0)When you create an instance of this algorithm, you need to pass it information about the map it will be applied to (map) and the lowest and highest value of the normalization range(0.0 and 1.0) norm=img.alg.CreateLinearRangeNormalizer(map,0.0,1.0)When you create an instance of this algorithm, you need to pass it information about the map it will be applied to (map) and the lowest and highest value of the normalization range(0.0 and 1.0)
The algorithm can then be applied to the map. Go ahead and apply it in place, overwriting the original data. The algorithm can then be applied to the map. Go ahead and apply it in place, overwriting the original data.
...@@ -146,7 +146,7 @@ print map_go.GetLevel() ...@@ -146,7 +146,7 @@ print map_go.GetLevel()
Finally, let’s create a low-pass-filtered version of the map and display it on the screen. Finally, let’s create a low-pass-filtered version of the map and display it on the screen.
We use the LowPassFilter algorithm: We use the LowPassFilter algorithm:
filter=iplt.alg.LowPassFilter(4.0*Units.nm) filter=img.alg.LowPassFilter(4.0*Units.nm)
We pass to the algorithm the resolution threshold for the filtering. Please notice that we pass it in nanometers, because we have been working with electron tomography in the past, so it comes easier to us to think in terms of nanometers as opposed to Angstrom. OpenStructure does the necessary conversion internally. We pass to the algorithm the resolution threshold for the filtering. Please notice that we pass it in nanometers, because we have been working with electron tomography in the past, so it comes easier to us to think in terms of nanometers as opposed to Angstrom. OpenStructure does the necessary conversion internally.
......
...@@ -17,9 +17,9 @@ title: Tutorials ...@@ -17,9 +17,9 @@ title: Tutorials
* [Storing Custom Data in an Entity](docs/tut/genericprop.html) * [Storing Custom Data in an Entity](docs/tut/genericprop.html)
### Images and Density Maps ### Images and Density Maps
* [Images / Density Maps - An Introduction](docs/tut/ipltintro.html) * [Images / Density Maps - An Introduction](docs/tut/imgintro.html)
* [Algorithms for Images and Density Maps](docs/tut/ipltalg.html) * [Algorithms for Images and Density Maps](docs/tut/imgalg.html)
* [The Data Viewer](docs/tut/ipltdataviewer.html) * [The Data Viewer](docs/tut/imgdataviewer.html)
## For Developers ## For Developers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment