Skip to content
Snippets Groups Projects
Commit f23f0bc8 authored by andreas's avatar andreas
Browse files

added map file for doku

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1987 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 9c70dfa1
No related branches found
No related tags found
No related merge requests found
File added
This diff is collapsed.
......@@ -2,7 +2,9 @@ title: List of image algorithms
[TOC]
# General Algorithms
# List of image algorithms
## General Algorithms
* dox[ost::img::alg::Clear|Clear]
* dox[ost::img::alg::Fill|Fill]
......@@ -22,14 +24,14 @@ title: List of image algorithms
* dox[ost::img::alg::LineAverage|LineAverage]
* dox[ost::img::alg::LineIterator|LineIterator]
# Fourier Transforms
## Fourier Transforms
* dox[ost::img::alg::FFT|FFT]
* dox[ost::img::alg::DFT|DFT]
* dox[ost::img::alg::PowerSpectrum|PowerSpectrum]
# Transformations
## Transformations
* dox[ost::img::alg::Mirror|Mirror]
* dox[ost::img::alg::Shift|Shift]
......@@ -38,20 +40,20 @@ title: List of image algorithms
* dox[ost::img::alg::DiscreteShrink|DiscreteShrink]
# Masking
## Masking
* dox[ost::img::alg::MaskImage|MaskImage]
* dox[ost::img::alg::SmoothMaskImage|SmoothMaskImage]
# Normalizer
## Normalizer
* dox[ost::img::alg::LinearNormalizer|LinearNormalizer]
* dox[ost::img::alg::LogNormalizer|LogNormalizer]
* dox[ost::img::alg::ODNormalizer|ODNormalizer]
# Thresholding
## Thresholding
* dox[ost::img::alg::ClipMinMax|ClipMinMax]
* dox[ost::img::alg::DensitySlice|DensitySlice]
......@@ -59,7 +61,7 @@ title: List of image algorithms
* dox[ost::img::alg::LocalSigmaThreshold|LocalSigmaThreshold]
# General filters
## General filters
* dox[ost::img::alg::Anisotropic|Anisotropic]
* dox[ost::img::alg::Gaussian|Gaussian]
......@@ -67,7 +69,7 @@ title: List of image algorithms
* dox[ost::img::alg::GaussianLaplacian|GaussianLaplacian]
# High/low pass filters
## High/low pass filters
* dox[ost::img::alg::LowPassFilter|LowPassFilter]
* dox[ost::img::alg::HighPassFilter|HighPassFilter]
......
......@@ -188,35 +188,38 @@ to save the full view. To save only the backbone atoms, we can first select the
## Loading images and density maps
Openstructure features a img module that is dedicated to the manipulation of images / density maps. The images or density maps can either be one-, two- or three-dimensional. The most common formats used in x-ray and electron crystallography and atomic force microscope are supported in addition to several general purpose image formats. See (feature list)[feature_list.html] for details.
The img module was originally developed as part of the Image Processing Library & Toolbox IPLT. More documentation and examples can also be found on the (IPLT website)[http://www.iplt.org].
The img module was originally developed as part of the Image Processing Library & Toolbox IPLT. More documentation and examples can also be found on the [IPLT website](http://www.iplt.org).
Before using the load functionality for an image, you have to import the io module. This is done by typing the following command in the python shell:
::::python
from ost import io
To load a density map, type
fragment_map=io.LoadImage('OST_INSTALLATION_PATH/share/openstructure/examples/misc/fragment.map')
map=io.LoadImage('OST_INSTALLATION_PATH/share/openstructure/examples/map/1ppt.map')
This will load the fragment density map from the specified file 'fragment.map' and store the result in fragment_map.
Now let's inspect what we just loaded:
print fragment_map.GetSampling()
::::python
print map.GetSampling()
# todo add more
We can see that the sampling is set to 1 Angstroem in all three dimensions.
We can see that the sampling is set to X Angstroem in all three dimensions.
## Manipulating images and density maps
The algorithms used for manipulation of an image are found in the img module. Therefore before using an algorithm we first have to import the img module.
::::python
from ost import img
The img module provides a wide range of algorithm to manipulate image data. Here for the example we use a LowPassFilter to restrict the resolution of the density map.
fragment_map_filtered=fragment_map.Apply(img.alg.LowPassFilter(3.0))
map_filtered=map.Apply(img.alg.LowPassFilter(3.0))
The filtered map is stored in a new variable called fragment_map_filtered.
......@@ -228,14 +231,16 @@ Now that we have a filtered map it's time to have a look at it.
todo: explain iso contouring
go=gfx.MapIso("filtered", fragment_map_filtered,0.5)
::::python
go=gfx.MapIso("filtered", map_filtered,0.5)
scene.Add(go)
todo: explain data viewer
gui.CreateDataViewer(fragment_map_filtered)
::::python
gui.CreateDataViewer(map_filtered)
Are more detailed explanation of the img module can be found in the (tutorial section for images and density maps)[tut/imgintro.html].
Are more detailed explanation of the img module can be found in the tutorial section for [images and density maps](tut/imgintro.html).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment