آموزش نرم افزار VV

تاریخ انتشار:1394-02-24
تاریخ بروزرسانی: 1394-02-24
تعداد بازدید: 2731



آموزش نرم افزار VV

VV یک نمایشگر تصویر منبع باز و متقاطع است که برای تجسم سریع و ساده تصاویر فضایی-زمانی: تصاویر 2D ، 2D + t ، 3D و 3D + t (یا 4D) طراحی شده است. VV (حداقل!) در لینوکس ، ویندوز و Mac OS در 32 و 64 بیت اجرا می شود.

VV به طور خاص برای ارزیابی کیفی ثبت تصاویر و تجسم درست تغییر شکل طراحی شده است. این برنامه شامل چندین ابزار برای نمایش تصاویر با استفاده از رنگ های مکمل یا شفافیت ، تجسم زمینه های برداری و تعریف علائم برجسته است. با داشتن کارت گرافیک مدرن ، ناوبری سریع و روان است.

VV تحت دو پروانه منبع باز توزیع می شود: BSD و CeCILL-B مجوز از CNRS ، بدون محدودیت و بدون ضمانت. احساس رایگان استفاده از آن را به عنوان دوست دارید! ما می خواهیم با ارسال ایمیل به vv [at] creatis.insa-lyon.fr به طور خلاصه توصیف استفاده شما از vv ، شما را ترغیب کنیم. هنگام استفاده از آن برای انتشار ، لطفاً به مقاله مراجعه کنید:

تصویری از VV

دانلود VV

https://github.com/open-vv/vv

 

2.1. Binaries

Binaries are provided without any warranty. We advise you to compile it yourself.

Latest release is v1.4 (October 2016 / updated March 2018):

v1.3 (October 2012).

An archlinux package named vv is available through AUR.

v1.2 (May 2011).

v1.1 (July 2010).

 

 

2.2. Source code

The latest source code is available in a git repository. To download it, run:

 

git clone https://github.com/open-vv/vv.git vv

Releases:

 

2.3. Docker

You can download a docker image of vv. After install Docker, you just have to do (2GB):

 

systemctl start docker
docker pull tbaudier/vv

And to lauch vv with the Docker:

 

systemctl start docker
docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/tbaudier:/home tbaudier/vv

 

2.4. Examples of data

Click here to download examples of images.

 

 

3. Compiling VV ... where to begin?

In order to compile VV you need the following third party software:

separate page details specific instructions to compile it statically, i.e. without links to dynamic libraries. The following instructions are linux/gcc oriented but it is easy to translate them to other OS/compilers.

 

3.1. CMake

CMake is a family of tools designed to build, test and package software.

You can download pre-compiled binaries and the source code here or via git:

 

git clone git://cmake.org/cmake.git

Installation instructions are available here.

CMake is used to build ITK, VTK and VV.

 

3.2. QT

Qt is a cross-platform application development framework widely used for the development of GUI programs.

We recommend you to install Qt5-devel and widget development library (Designer, Xml, Tools, Gui, Network, OpenGL, ...) with your package manager (e.g.: apt-get, Yum, Yast, ...)

You can download pre-compiled binaries or the source code here or via git:

 

git clone git://code.qt.io/qt/qt.git

A working version can be download here (.tar.gz) or here (.zip).

To compile it, you can try:

 

./configure -opensource -confirm-license -nomake examples -nomake tests -no-gtkstyle -qt-xcb
make -j4
make install

 

3.3. VTK

The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, image processing and visualization.

VV is tested with VTK. You can download the source code here or via git. We recommend you to use version 7.1.0:

 

git clone https://github.com/Kitware/VTK.git vtk
cd vtk
git checkout v7.1.0
cd ..

Create a binary directory, get into it and run CMake:

 

mkdir vtk-binary
cd vtk-binary
ccmake ../vtk

You need to change the following build options for VV:

 

Module_vtkGUISupportQt=ON
Module_vtkGUISupportQtOpenGL=ON
Module_vtkRenderingQt=ON
Module_vtkViewsQt=ON
VTK_RENDERING_BACKEND=OpenGL
VTK_QT_VERSION=5
All Qt5...DIR to /usr/local/Qt-5.../lib/cmake/QT5...

And finally, compile it:

 

make

NB:

  • Be sure you use OpenGL1, maybe you need to change VTK_OPENGL_VERSION to 1.
  • With VTK version >= 7.1.0

 

VTK_Group_Rendering:BOOL=ON
  • If you don't have all Qt5 Modules, prefer to set on the previous module instead of VTK_Group_Qt.
  • You need to specify the Qt path selecting the QT_QMAKE_EXECUTABLE binary if it is not done automatically. More specially:

 

Qt5_DIR="/usr/local/Qt-5.../lib/cmake/Qt5"
Qt5Designer_DIR="/usr/local/Qt-5...lib/cmake/Qt5Designer"
Qt5Xml_DIR="/usr/local/Qt-5.../lib/cmake/Qt5Xml"
Qt5Network_DIR="/usr/local/Qt-5.../lib/cmake/Qt5Network"
  • If you are using a MAC OS, you need to enable the option VTK_USE_COCOA or VTK_USE_CARBON.

 

3.4. ITK

To compile ITK from git: We recommend you to use version 4.13.0:

 

git clone https://github.com/InsightSoftwareConsortium/ITK.git itk
cd itk
git checkout v4.13.0
cd ..

Create a binary directory, get into it and run CMake:

 

mkdir itk-binary
cd itk-binary
ccmake ../itk

In CMake, change the following settings:

 

BUILD_SHARED_LIBS=ON
Module_ITKVtkGlue=ON

You need to specify the VTK path if it is not done automatically. More specially:

 

VTK_DIR="/VTK/VTK_bin"

And finally, compile it:

 

make

 

3.5. VV

Finally, to compile VV from git:

 

git clone https://github.com/open-vv/vv.git vv

 

mkdir vv-binary
cd vv-binary
ccmake ../vv
make

You have to set the correct paths to ITK binaries and Qt5 into ccmake prompt

 


 

4. Feature overview

 

4.1. Image IO

VV open and display images of various file formats :

  • In 2 dimensions : hdr, mhd, jpeg, bmp, png, tiff, dicom...
  • In 3 dimensions : hdr, mhd, dicom...
  • In 4 dimensions : hdr, mhd, dicom...

Note the explicit distinction between 3D and 2D+t images. VV allows the reinterpretation of any n dim image as a (n-1) dim +t image. Any loaded image can be saved as another file format through the "save-as" menu.

VV also contains a minimal Dicom Browser to open images series (which works sometimes).

A 'play mode' is also available for temporal images in order to navigate into images during motion.

 

4.2. Registration evaluation

Five different tools for the qualitative and quantitative evaluation of registration are available. These tools work for 2D, 3D and 4D images.

 

4.2.1. Synchronized navigation

Probably the most simple but useful tool to visualize and compare up to four images at the same time. By combining the four different viewer panels and temporal capabilities, sophisticated synchronized navigation between several images orientations or time sequences can be achieved. Pixel values of each synchronized images at current cursor position are available.

 

4.2.2. Image fusion with complementary-colors

One conventional approach to qualitatively evaluate the result of an image registration procedure consists in comparing the reference image with the other image deformed by the sought transformation. Overlapping the two images allows to visualize the differences between the reference and registered images. VV provides an image fusion tool which merges two images into a single one : the image differences are enhanced with two different colors (for positive and negative differences) while the pixel color tends to the original grey levels when differences are low. Such approach is similar to the one used in the XVI software from Elekta which has proven useful for image comparison. The choice of the two complementary colors can be customized by the user with a simple slider. Both spatial (between slice) and temporal navigation remains as previously described. Pixel values and difference values at current cursor position are indicated in the left panel. This feature is for example used to overlay a reference 3D image onto a 4D image in order to appreciate the organs displacement with respect to the reference.

 

4.2.3. Image fusion by transparency

The last image comparison tool consists in superimposing two images with a given user-defined opacity value and colormap. Such feature is for example used for image comparison in the field of registration procedure, but is also used, in the field or radiation therapy, to superimpose computed dose distributions onto an anatomical image. Multimodality registration could also benefit from this tool. Pixel intensity range of the fusion image must be between [0-1000] (that will be changed in the future).

 

4.2.4. Deformation field visualization

Deformable registration results are often obtained in the form of deformation fields which represent the displacement of each image pixel from the reference image to the other image. In addition to quantitative analysis, we believe that it is important that researchers and clinicians can visualize such data. Conventional image differences such as the one described previously allow a fast evaluation of the registration result. However, it is well known that, as deformable registration is an ill-posed problem,a perfect match between the deformed image and the reference image can be obtained even though the deformation field itself is false. In order to evaluate a given registration, it is thus required to appreciate not only image differences but also the deformation field itself. However, it is not easy to visualize such a large amount of data : for example a typical deformation field encompassing the breathing motion of a 4D CT image of the thorax is a R3 -> R4 function, which can be represented by a 512*512*141*10 3D vectorial imagepopi-model. VV allows to load and display such data by superimposing on a given slice a set of 2D arrows representing the displacement vector at each point, projected according to the slice orientation. The sampling of the deformation field can be modified to increase or decrease the number of displayed vectors. This is for example useful when zooming (more vectors can be displayed when a large zoom factor is used), or to adapt the navigation speed according to the hardware capabilities. Components and norm of the displacement vector at current mouse position is continuously displayed in the 'Overlay' tab. In our group, this tool is used to quickly evaluate the results of a deformable registration algorithm or helps clinicians to quantitatively evaluate the displacement of a specific point in the image.

 

4.2.5. Landmark placement

The previously described features are mainly dedicated to qualitative and visual analysis. One of the most common ways to evaluate quantitatively a registration consists in computing the distance between anatomical landmarks defined by experts on both images to be registered. The tab 'landmarks' allow very simple landmarks selection : the physicians should press the space bar at the current mouse location to define a landmarks, displayed on the image. The set of labels can then be saved in a text file for further evaluation study.

 

4.3. Misc tools

  • Pixel conversion: to convert the pixel type of an image, right click on the image name on the left panel, choose 'convert'.

  • Image resampling: in menu 'tool', choose resample with various option.

  • Image Arithmetic: to perform simple image unary or binary operation (addition, substraction ...)

  • Binarize Image: apply simple threshold (with interactive feedback)

  • Crop Image: crop an image

  • Dicom RT Struct import: in the menu 'file', select Open DicomRT Struct. Choose the different contours to be superimposed to the current image.

 


 

4.4. Alternative/related software

The following software can also be used to display medical images :

 


 

5. FAQ

Here are a few known problems that we have encountered in the past. However if you do fall upon any new bug please feel free to report it here.

  • Graphic cards and binaries

Binaries that you can download on this page are generated with specific Graphic Cards. Using these, the software may not work as fast as it is supposed to. That is why we advise you to compile your own VV version using source code. This way, it will be adapted to your own Graphic Card.

  • Windows memory allocation failure

On win32 operating systems, memory allocation for a process is limited to 2Gb. Furthermore, when loading an image, memory must be allocated in a contiguous way. Using full resolution data, you may encounter problems opening images with the error message : " ... Description: Failed to allocate memory for image."

For now, the only way to shunt this problem is to use split files and to open them using menu "Merge images as one". 64 bits operating systems do not have such a limit.

  • Compiz

On Linux, using vv with Compiz or advanced graphical desktop features have sometimes shown large degradation in performance. With NVIDIA card, you may have to use the following configuration option before using vv :

 

nvidia-xconfig --composite
nvidia-xconfig --render-accel
nvidia-xconfig --add-argb-glx-visuals -d 24
  • Bug with Nvidia drivers > 275.09.21 and < 295.20

Some bugs in NVidia drivers affects vv with certain NVidia's card, leading to segfault on image rendering. Desactivating multithreading in OpenGL solves some of these bugs. You can do it with the following command :

 

export __GL_SINGLE_THREADED=1

To completely solves NVidia's issues you can download a recent nvidia driver >= 295.20

  • What should I add to my .bashrc to exclude .raw files from the completion for vv?

 

complete -A file -X '*.raw' vv
  • I get a linking error related to libtiff when linking vv. What can I do ?

 

Set ITK_USE_SYSTEM_TIFF to ON
  • All the icons are invisible, what's wrong?

Different PNG and/or zlib libraries are used by vtk, gdcm, itk, qt and/or vv. Change itk and vtk cmake options, e.g., for ITK, to

 

ITK_USE_SYSTEM_PNG:BOOL=ON
ITK_USE_SYSTEM_ZLIB:BOOL=ON
  • I want to use Qt5 with the code sources. What do I need to install?

With Linux, you have to install some complementary Qt5 libraries. You can find them with your favourite package manager:

 

libqt5WebKit5-dev
libqt5WebKitWidgets5-dev
qttools5-dev (or libqt5-qttools-devel)
qttools5 (or libqt5-qttools)

But a problem of pointer slowness can be detected. In a such case, we recommend you to install Qt5 using the source available here and follow the instruction in the compilation section.

  • I want to use clitk tools, how it works?

You can build clitk tools to use main functionality of vv with command line. A help for all tools is availablehere.

  • I have this error during compilation: VCL_STATIC_CONST_INIT_FLOAT_DECL?

Be sure to compile vv with a version of gcc using an older version of c++ than c++11.

  • vv doesn't display the same voxel value between cross pointer panel and mouse information overlay.

We know, it's a choice. The voxel value display in the cross pointer panel is the value of the interpolated image (eg.: after a registration) and the mouse pointer value is the original one.

 

6. Developers

Want to help ? You can contribute by posting bugs or feature requests to: Bug Tracker. Tests can be carried out with the following test template (it's still under construction, so contributions are of course welcome).

You could also subscribe to our VV mailing list and follow the latest developments and features via Mailing List

 

6.1. Coding style

  • 2 spaces indentation, no tab characters, unix line ending
  • Unix block format:

 

void Foo(bool isFoo)
{
  if (isFoo) {
    bar();
  } else {
    anotherBar;
  }
}
  • Case
    • Preprocessor defines and macros in upper case;
    • Member functions start with an upper case.
  • Naming:
    • Member variables start with m;
    • Classes, types, iterators, etc... should follow ITK or VTK code style.

  • Comments
    • Put a dash line before and after the function definition:

 

//--------------------------------------------------------------------
void myFunc()
{
}
//--------------------------------------------------------------------

astyle can be used to reset a file:

 

astyle --lineend=linux --indent=spaces=2 --brackets=linux --keep-one-line-statements toto.cxx

or a bunch of files:

 

find -iname "*.?xx" -exec astyle --lineend=linux --indent=spaces=2 --brackets=linux --keep-one-line-blocks {} \;

Note that kitware uses uncrustify for its code.

 

برای مطالعه در باره موضوعات زیر روی هر عنوان کلیک کنید.
معرفی رشته مهندسی هسته ای
باکس دانلود
شناسه فایل تاریخ انتشار تاریخ اعتبار عنوان تعداد دانلود دانلود
7 1397-12-17 1397-12-17 321 file_download
درباره نویسنده

من رسول شامحمدی هستم . تخصص من برنامه نویسی و محاسبات مونت کارلو هست. همیشه سعی میکنم در اینجا تجارب خودم را انتقال بدم. شماره تلفن من 09372846654 هست برای سفارش کار یا مشاوره

نظرات کاربران
اولین نفری باشید که نظر میدهید

همکاری با ما

با سالها تجربه آماده ایم با شما همکاری گسترده ای داشته باشیم. همکاری با ما می تواند در قالب موارد زیر باشد
1) مشاوره در انجام تز دکتری در زمینه محاسبات هسته ای
2) مشاوره در انجام پایان نامه دوره کارشناسی ارشد در زمینه محاسبات هسته ای
3) ارائه مشاوره در جهت انجام پروژه های صنعتی
4) انجام طراحی ها و محاسبات مختلف
5) برگزاری دوره های تخصصی آموزش کد های هسته ای
6) ...
 با ما تماس بگیرید
09372846654-rasul.shamohamady@gmail.com
 

ما در شبکه های اجتماعی دنبال کنید.

گروه تلگرامی ویژه رفع اشکال کد های هسته ای و نرم افزار ها

این گروه صرفا برای بحث در باره کد ها و نرم افزارهای هسته ای می باشد لذا از بحث های نامرتبط خود داری فرمایید و با معرفی گروه به دوستان خود در مفید بودن بیشتر گروه همیار ما باشید. برای عضو شدن در این گروه تلگرامی با شماره 09372846654 در تلگرام پیام دهید.

کانال وب سایت مهندس شامحمدی

در این کانال آخرین اخبار منتشر شده در سایت نشر داده می شود.برای عضو شدن در این گروه تلگرامی با شماره 09372846654 در تلگرام پیام دهید

کانال آپارت ما

این کانال متعلق به وب سایت مهندس شامحمدی می باشد. تنها قسمتی از ویدئو های آموزشی در اینجا نشان داده است.