MITK Properties背后的概念

一个datanode含有Properties属性,MITK根据这些信息操作datanode。这些属性信息不作为datanode内部数据,但却是rendering或interaction时需要的。

读取和设置property

//1: Read a property
mitk::Property::Pointer readProperty = node->GetProperty("color"); //read the property "color" from the data node
mitk::ColorProperty::Pointer colorProperty = dynamic_cast<mitk::ColorProperty*>(readProperty); //cast this property to the subtype ColorProperty
//2: Write a property
mitk::BoolProperty::Pointer newProperty = mitk::BoolProperty::New( true ); //create a new property, in this case a boolean property
node->SetProperty( "IsTensorVolume", newProperty ); //add this property to node with the key "IsTensorVolume"

注意到:设置属性的时候需要先建好属性,以及这个属性的key。那么key是MITK提前定义的,还是自己随意设?MITK已经定义好。

property服务

有propterty,必须就有管理和操作这些property的类,也就是服务员。MITK里面有四个服务员,aliases(mitk::IPropertyAliases),descriptions(mitk::IPropertyDescriptions),extensions(mitk::IPropertyExtensions),filters(mitk::IPropertyFilters)。

常用properties

文件管理

  • path:该文件来自于磁盘哪个位置
  • name:node在datamanager中的名字
  • selected:datamanager中的这个node是否被选中

常用渲染相关的property

  • color:由三个值定义(RGB),值在0.0到1.0之间。
  • layer: 决定哪个图像在上,哪个在下。datatype相同的图像,layer才有作用。pointSet永远在image上面,layer在此没有作用
  • levelwindow :
  • LookupTable :该属性包含一个用户自定义的loouptable,可以将灰度值(scalar value)映射到颜色值(color value)。比如,如果一个像素点的灰度值是128,lookuptable可以将值映射为(255,0,0)。如果设置了LookupTable 属性,则color属性将对图像无效。
  • opacity :值在0.0--1.0。
  • reslice interpolation - This property takes effect in swivel mode or crosshair rotaiton only. The interpolation modes "Nearest", "Linear", and "Cubic" are available and effect the pixel outcome along the rotated plane.
  • texture interpolation - This property toggles interpolation of the texture. If enabled, edges between image pixels are blurred. If disabled, edges remain sharp.
  • visible - toggle node/image/surface being rendered at all

面渲染属性

  • back color - 在2D中,surface以外区域的颜色。此处surface表示什么??
  • back normal lenth (px) - in 2D, length of the normals in pixels (When decreasing it the color using the front color is shorter?)
  • color mode - (From VTK) Control how the scalar data is mapped to colors. By default (ColorModeToDefault), unsigned char scalars are treated as colors, and NOT mapped through the lookup table, while everything else is. Setting ColorModeToMapScalars means that all scalar data will be mapped through the lookup table.
  • draw normals 2d - 在2D,决定是否显示法向量(normals)
  • front color - 在 2D, surface内的法向量颜色
  • front normal lenth (px) - in 2D, 法向量的长度,单位是像素 (When decreasing it the color using the back color is shorter?)
  • invert normals - in 2D, switch front/back normals
  • line width - in 2D, 控制surface与plane相交处的线的宽度 (and normals)
  • material.ambientCoefficient - in 3D ambient lighting
  • material.diffuseCoefficient - in 3D scattering of light
  • material.interpolation - Choose which interpolation algorithm to use for surface construction
  • material.representation - Choose the representation to draw the mesh in (Surface, Wireframe, Point Cloud)
  • material.specularCoefficient - in-/decrease non-scattered reflection
  • material.specularPower - control percentage of non-scattered reflection
  • material.wireframeLineWidth - width of the wires if wireframe representation is
  • scalar mode - (From VTK) Control how the filter works with scalar point data and cell attribute data. By default (ScalarModeToDefault), the filter will use point data, and if no point data is available, then cell data is used. Alternatively you can explicitly set the filter to use point data (ScalarModeToUsePointData) or cell data (ScalarModeToUseCellData). You can also choose to get the scalars from an array in point field data (ScalarModeToUsePointFieldData) or cell field data (ScalarModeToUseCellFieldData). If scalars are coming from a field data array, you must call SelectColorArray before you call GetColors. When ScalarMode is set to use Field Data (ScalarModeToFieldData), you must call SelectColorArray to choose the field data array to be used to color cells. In this mode, if the poly data has triangle strips, the field data is treated as the celldata for each mini-cell formed by a triangle in the strip rather than the entire strip.
  • scalar visibility - (From VTK) Turn on/off flag to control whether scalar data is used to color objects.
  • selected - 该节点是否被选中
  • shader - which shader to use for surface rendering, currently the options are "fixed" and "mitkShaderLightning"

体渲染属性

  • TransferFunction - contains transfer function for use in coloring image
  • volumerendering - Should the volume be rendered or not
  • volumerendering configuration - Choice between Composite und MIP
  • volumerendering.cpu.ambient - ambient lighting
  • volumerendering.cpu.diffuse - in-/decrease light dispersion
  • volumerendering.cpu.specular - in-/decrease non-scattered reflection
  • volumerendering.cpu.specular.power - control percentage of non-scattered reflection
  • volumerendering.gpu.ambient - same as cpu with gpu
  • volumerendering.gpu.diffuse - same as cpu with gpu
  • volumerendering.gpu.reducesliceartifacts - Reduce slice artifacts
  • volumerendering.gpu.specular - same as cpu with gpu
  • volumerendering.gpu.specular.power - same as cpu with gpu
  • volumerendering.gpu.usetexturecompression - use texture compression
  • volumerendering.ray.ambient - same as cpu with ray
  • volumerendering.ray.diffuse - same as cpu with ray
  • volumerendering.ray.specular - same as cpu with ray
  • volumerendering.ray.specular.power - same as cpu with ray
  • volumerendering.usegpu - Whether to use the GPU for rendering or not
  • volumerendering.uselod - Whether to use the Level Of Detail mechanism or not
  • volumerendering.usemip - Whether to utilize maximum intensity projection
  • volumerendering.useray - Whether to use raycasting or not
Remarks
Uselod can be active with usegpu, usemip, useray, but any of the latter can not be used with another one of them.

Point Set 属性

  • close contour - Toggles whether the first and the last point of a contour (connecting pieces between following points of a pointset) are connected.
  • contourcolor - Determines the color of the contour (connecting pieces between following points of a pointset). Visible only if "show contour" is active.
  • contoursize - Represents the diameter of the contour (which is kind of a tube between the following points of a pointset). Visible only if "show contour" is active.
  • distance decimal digits - Sets the number of decimal places for the euclidean point to point distance which can be displayed by activating "show distances".
  • point 2D size - The positions of points in the 2D view are represented by crosses. "point 2D size" determines the size of this crosses.
  • point line width - The positions of points in the 2D view are represented by crosses. "point line width" determines the thickness of this crosses.
  • pointsize - The positions of points in the 3D view are represented by spheres. "pointsize" determines the diameter (size) of this spheres.
  • selectedcolor - Sets the color for selected points from a pointset.
  • show angles - If "show contour" is active the angles between two contour parts can be shown.
  • show contour - Connects following points of a pointset by drawing connecting pieces between this points.
  • show distance lines - Shows all angles and lines of the contour (in 2D views) even if they are not on the view's current slice.
  • show distances - Draws lines between following points (in 2D views) and displays the euclidean distance between this points.
  • show points - Toggles if the points are visible or not in the view.
  • updateDataOnRender - If "true" the pointset is updated before rendering. If the pointset is part of a filter pipeline this also causes an update to the pipeline which sometimes may be not desired so it can be switched of by setting it to false.

Geometry2D Properties

  • draw edges - Determines if tubes should be drawn around the edges of the 2D plane. Default is true。

Segmentation Properties

这些属性控制如何显示分割结果:

  • binary:控制该图像是否为binary/segmentation image
  • binaryimage.hoveringannotationcolor: controls the colour of the annotation if the segmentation has a property signifying it is hovered over set to true
  • binaryimage.hoveringcolor: controls the colour of the segmentation if it has a property signifying it is hovered over set to true
  • binaryimage.selectedannotationcolor: controls the colour of the annotation if the segmentation has a property signifying it is selected set to true
  • binaryimage.selectedcolor: controls the colour of the segmentation if it has a property signifying it is selected set to true
  • segmentation:segmentation view用此来检查该图像是否被看做分割图像
  • outline binary:是否将该分割图像显示为outline (on) 或 solid (off)
  • outline width: outline的宽度,如果要显示outline的话。
  • showVolume: controls whether the volume of the segmentation is shown in the 2D views as an annotation
Planar Figure Properties

  • planarfigure.default.helperline.color controls the colour of the helperline, if the figure is neither selected nor hovered over
  • planarfigure.default.helperline.opacity controls the opacity of the helperline, if the figure is neither selected nor hovered over
  • planarfigure.default.line.color controls the colour of the line, if the figure is neither selected nor hovered over
  • planarfigure.default.line.opacity controls the opacity of the line, if the figure is neither selected nor hovered over
  • planarfigure.default.marker.color controls the colour of the markers, if the figure is neither selected nor hovered over
  • planarfigure.default.marker.opacity controls the opacity of the markers, if the figure is neither selected nor hovered over
  • planarfigure.default.markerline.color controls the colour of the outline of the markers, if the figure is neither selected nor hovered over
  • planarfigure.default.markerline.opacity controls the opacity of the outline of the markers, if the figure is neither selected nor hovered over
  • planarfigure.default.outline.color controls the colour of the outline, if the figure is neither selected nor hovered over
  • planarfigure.default.outline.opacity controls the opacity of the outline, if the figure is neither selected nor hovered over
  • planarfigure.drawoutline controls whether to draw the outline
  • planarfigure.drawshadow controls whether to draw the shadow
  • planarfigure.helperline.width controls the width of the helperline
  • planarfigure.hover.helperline.color controls the colour of the helperline, if the figure is hovered over but not selected
  • planarfigure.hover.helperline.opacity controls the opacity of the helperline, if the figure is hovered over but not selected
  • planarfigure.hover.line.color controls the colour of the line, if the figure is hovered over but not selected
  • planarfigure.hover.line.opacity controls the opacity of the line, if the figure is hovered over but not selected
  • planarfigure.hover.marker.color controls the colour of the markers, if the figure is hovered over but not selected
  • planarfigure.hover.marker.opacity controls the opacity of the markers, if the figure is hovered over but not selected
  • planarfigure.hover.markerline.color controls the colour of the outline of the markers, if the figure is hovered over but not selected
  • planarfigure.hover.markerline.opacity controls the opacity of the outline of the markers, if the figure is hovered over but not selected
  • planarfigure.hover.outline.color controls the colour of the outline, if the figure is hovered over but not selected
  • planarfigure.hover.outline.opacity controls the opacity of the outline, if the figure is hovered over but not selected
  • planarfigure.ishovering is set to true if the figure is hovered over, controls if hover settings are used
  • planarfigure.line.width controls the width of the lines
  • planarfigure.outline.width controls the width of the outlines
  • planarfigure.selected.helperline.color controls the colour of the helperline, if the figure is selected
  • planarfigure.selected.helperline.opacity controls the opacity of the helperline, if the figure is selected
  • planarfigure.selected.line.color controls the colour of the line, if the figure is selected
  • planarfigure.selected.line.opacity controls the opacity of the line, if the figure is selected
  • planarfigure.selected.marker.color controls the colour of the markers, if the figure is selected
  • planarfigure.selected.marker.opacity controls the opacity of the markers, if the figure is selected
  • planarfigure.selected.markerline.color controls the colour of the outline of the markers, if the figure is selected
  • planarfigure.selected.markerline.opacity controls the opacity of the outline of the markers, if the figure is selected
  • planarfigure.selected.outline.color controls the colour of the outline, if the figure is selected
  • planarfigure.selected.outline.opacity controls the opacity of the outline, if the figure is selected
  • planarfigure.shadow.widthmodifier controls the width of the shadow

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值