亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? image4.cxx

?? InsightToolkit-1.4.0(有大量的優化算法程序)
?? CXX
字號:
/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile: Image4.cxx,v $
  Language:  C++
  Date:      $Date: 2003/09/10 14:29:50 $
  Version:   $Revision: 1.25 $

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
// Software Guide : BeginLatex
//
// Even though \href{http://www.itk.org}{ITK} can be used to perform
// general image processing tasks, the primary purpose of the toolkit is the
// processing of medical image data.  In that respect, additional
// information about the images is considered mandatory. In particular the
// information associated with the physical spacing between pixels and the
// position of the image in space with respect to some world coordinate
// system are extremely important.
//
// Image origin and spacing are fundamental to many
// applications. Registration, for example, is performed in physical
// coordinates. Improperly defined spacing and origins will result in
// inconsistent results in such processes. Medical images with no spatial
// information should not be used for medical diagnosis, image analysis,
// feature extraction, assisted radiation therapy or image guided surgery. In
// other words, medical images lacking spatial information are not only
// useless but also hazardous.
//
// \begin{figure} \center
// \includegraphics[width=\textwidth]{ImageOriginAndSpacing.eps}
// \itkcaption[ITK Image Geometrical Concepts]{Geometrical concepts associated
// with the ITK image.}
// \label{fig:ImageOriginAndSpacing}
// \end{figure}
//
// Figure \ref{fig:ImageOriginAndSpacing} illustrates the main geometrical
// concepts associated with the \doxygen{Image}. In this figure, circles are
// used to represent the center of pixels. The value of the pixel is assumed
// to exist as a Dirac Delta Function located at the pixel center. Pixel
// spacing is measured between the pixel centers and can be different along
// each dimension. The image origin is associated with the coordinates of the
// first pixel in the image. A \emph{pixel} is considered to be the
// rectangular region surrounding the pixel center holding the data
// value. This can be viewed as the Voronoi region of the image grid, as
// illustrated in the right side of the figure.  Linear interpolation of
// image values is performed inside the Delaunay region whose corners
// are pixel centers.
//
// Software Guide : EndLatex 


#include "itkImage.h"
#include "itkPoint.h"

int main()
{
  typedef itk::Image< unsigned short, 3 > ImageType;

  ImageType::Pointer image = ImageType::New();

  ImageType::IndexType start;
  ImageType::SizeType  size;

  size[0]  = 200;  // size along X
  size[1]  = 200;  // size along Y
  size[2]  = 200;  // size along Z

  start[0] =   0;  // first index on X
  start[1] =   0;  // first index on Y
  start[2] =   0;  // first index on Z

  ImageType::RegionType region;
  region.SetSize( size );
  region.SetIndex( start );
  
  image->SetRegions( region );
  image->Allocate();

  image->FillBuffer( 0 );

  // Software Guide : BeginLatex
  //
  // Image spacing is represented in a \code{C-like} array of type \code{double}
  // whose size matches the dimension of the image. In order to manually set
  // the spacing of the image, an array of the corresponding type must be
  // created.  The elements of the array should then be initialized with the
  // spacing between the centers of adjacent pixels. The following code
  // illustrates the methods available in the Image class for dealing with
  // spacing and origin.
  //
  // \index{itk::Image!Spacing}
  //
  // Software Guide : EndLatex

  // Software Guide : BeginCodeSnippet 
  double spacing[ ImageType::ImageDimension ];

  // Note: measurement units (e.g., mm, inches, etc.) are defined by the application.
  spacing[0] = 0.33; // spacing along X
  spacing[1] = 0.33; // spacing along Y
  spacing[2] = 1.20; // spacing along Z
  // Software Guide : EndCodeSnippet 


  // Software Guide : BeginLatex
  //
  // The array can be assigned to the image using 
  // the \code{SetSpacing()} method.
  //
  // \index{itk::Image!SetSpacing()}
  //
  // Software Guide : EndLatex

  // Software Guide : BeginCodeSnippet 
  image->SetSpacing( spacing );
  // Software Guide : EndCodeSnippet 


  //  Software Guide : BeginLatex
  //
  // The spacing information can be retrieved from an image by using the
  // \code{GetSpacing()} method. This method returns a pointer to a static
  // array of type \code{double}. The returned pointer can then be used to read the
  // contents of the array. Note the use of the \code{const} keyword to indicate
  // that the array will not be modified. 
  //
  //  Software Guide : EndLatex 

  // Software Guide : BeginCodeSnippet
  const double * sp = image->GetSpacing();  

  std::cout << "Spacing = ";
  std::cout << sp[0] << ", " << sp[1] << ", " << sp[2] << std::endl;
  // Software Guide : EndCodeSnippet


  // Software Guide : BeginLatex
  //
  // The image origin is managed in a similar way to the spacing.  A
  // \code{C-like} array of type \code{double} matching the dimension of the image
  // must first be allocated.  The coordinates of the origin can then be
  // assigned to every component.  These coordinates correspond to the
  // position of the first pixel of the image with respect to an arbitrary
  // reference system in physical space. It is the user's responsibility to
  // make sure that multiple images used in the same application are using a
  // consistent reference system. This is extremely important in image
  // registration applications.
  // 
  // The following code illustrates the creation and assignment of a variable
  // suitable for initializing the image origin.
  //  
  // \index{itk::Image!origin}
  // \index{itk::Image!SetOrigin()}
  //
  // Software Guide : EndLatex

  // Software Guide : BeginCodeSnippet 
  double origin[ ImageType::ImageDimension ];

  origin[0] = 0.0;  // coordinates of the 
  origin[1] = 0.0;  // first pixel in N-D
  origin[2] = 0.0;

  image->SetOrigin( origin );
  // Software Guide : EndCodeSnippet 


  //  Software Guide : BeginLatex
  //
  //  The origin can also be retrieved from an image by using the
  //  \code{GetOrigin()} method. This will return a pointer to an internal
  //  array of \code{double}s. The pointer can be used to read the contents of
  //  the array. Note again the use of the \code{const} keyword to indicate
  //  that the array contents will not be modified.
  //
  //  Software Guide : EndLatex 

  // Software Guide : BeginCodeSnippet
  const double * orgn = image->GetOrigin();

  std::cout << "Origin = ";
  std::cout << orgn[0] << ", " << orgn[1] << ", " << orgn[2] << std::endl;
  // Software Guide : EndCodeSnippet


  // Software Guide : BeginLatex
  //
  // Once the spacing and origin of the image have been initialized, the image
  // will correctly map pixel indices to and from physical space
  // coordinates. The following code illustrates how a point in physical
  // space can be mapped into an image index for the purpose of reading the
  // content of the closest pixel.
  //
  // First, a \doxygen{Point} type must be declared. The point type is
  // templated over the type used to represent coordinates and over the
  // dimension of the space. In this particular case, the dimension of the
  // point must match the dimension of the image. 
  //
  // Software Guide : EndLatex

  // Software Guide : BeginCodeSnippet 
  typedef itk::Point< double, ImageType::ImageDimension > PointType;
  // Software Guide : EndCodeSnippet 


  // Software Guide : BeginLatex
  //
  // The Point class, like an \doxygen{Index}, is a relatively small and
  // simple object.  For this reason, it is not reference-counted like the
  // large data objects in ITK.  Consequently, it is also not manipulated
  // with \doxygen{SmartPointer}s.  Point objects are simply declared as
  // instances of any other C++ class.  Once the point is declared, its
  // components can be accessed using traditional array notation. In
  // particular, the \code{[]} operator is available. For efficiency reasons,
  // no bounds checking is performed on the index used to access a particular
  // point component. It is the user's responsibility to make sure that the
  // index is in the range $\{0,Dimension-1\}$.
  //
  // Software Guide : EndLatex

  // Software Guide : BeginCodeSnippet 
  PointType point;

  point[0] = 1.45;    // x coordinate
  point[1] = 7.21;    // y coordinate
  point[2] = 9.28;    // z coordinate  
  // Software Guide : EndCodeSnippet 


  // Software Guide : BeginLatex
  // 
  // The image will map the point to an index using the values of the
  // current spacing and origin. An index object must be provided to
  // receive the results of the mapping. The index object can be 
  // instantiated by using the \code{IndexType} defined in the Image
  // type.
  //
  // Software Guide : EndLatex

  // Software Guide : BeginCodeSnippet 
  ImageType::IndexType pixelIndex;
  // Software Guide : EndCodeSnippet 


  // Software Guide : BeginLatex
  // 
  // The \code{TransformPhysicalPointToIndex()} method of the image class
  // will compute the pixel index closest to the point provided. The method
  // checks for this index to be contained inside the current buffered pixel
  // data. The method returns a boolean indicating whether the resulting
  // index falls inside the buffered region or not. The output index should
  // not be used when the returned value of the method is \code{false}.
  //
  // The following lines illustrate the point to index mapping and the
  // subsequent use of the pixel index for accessing pixel data from the
  // image.
  //
  // \index{itk::Image!TransformPhysicalPointToIndex()}
  //
  // Software Guide : EndLatex

  // Software Guide : BeginCodeSnippet 
  bool isInside = image->TransformPhysicalPointToIndex( point, pixelIndex ); 

  if ( isInside )
    {
    ImageType::PixelType pixelValue = image->GetPixel( pixelIndex );

    pixelValue += 5;

    image->SetPixel( pixelIndex, pixelValue );
    }
  // Software Guide : EndCodeSnippet 


  // Software Guide : BeginLatex
  // 
  // Remember that \code{GetPixel()} and \code{SetPixel()} are very
  // inefficient methods for accessing pixel data. Image iterators should be
  // used when massive access to pixel data is required.
  //
  // Software Guide : EndLatex

  return 0;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆91免费看| 亚洲精品成人少妇| 黄色小说综合网站| 久久久久久久网| 国产成人啪午夜精品网站男同| 欧美成人vr18sexvr| 国产精品一级黄| 亚洲桃色在线一区| 欧美三级电影网| 青青草国产精品亚洲专区无| 精品国产一区二区三区不卡| 国内精品在线播放| 国产精品久久久久7777按摩 | 欧美日韩视频不卡| 日本一区中文字幕| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 中文字幕巨乱亚洲| 日韩一区二区麻豆国产| 麻豆精品久久久| 国产欧美日本一区视频| 91欧美激情一区二区三区成人| 亚洲黄色录像片| 日韩欧美www| 99视频精品免费视频| 亚洲一区二区精品久久av| 日韩午夜在线播放| 成人av资源站| 亚洲一区二区三区精品在线| 欧美va天堂va视频va在线| 粗大黑人巨茎大战欧美成人| 亚洲国产乱码最新视频| 久久久久久电影| 欧美在线观看一区| 国产一区二区在线观看免费 | 精品国产一区二区三区久久久蜜月 | 欧美伊人久久久久久久久影院 | 国产精品亚洲视频| 午夜久久久影院| 国产精品不卡一区| 欧美一二三四区在线| 91亚洲精品久久久蜜桃| 国产一区二区视频在线播放| 亚洲激情五月婷婷| 久久网这里都是精品| 欧美日产国产精品| 91网上在线视频| 国产一区二区精品久久99| 亚洲图片自拍偷拍| 综合久久综合久久| 国产色产综合色产在线视频| 91精品国产高清一区二区三区| 99国产麻豆精品| 国产精品99久久久久久宅男| 人人超碰91尤物精品国产| 亚洲精品综合在线| 国产欧美1区2区3区| 日韩一区二区三区免费看| 91丨porny丨最新| 丰满白嫩尤物一区二区| 免费成人小视频| 午夜精品久久久久久久99水蜜桃| 欧美激情一区二区| 久久蜜桃一区二区| 精品国产区一区| 4438x成人网最大色成网站| 色综合久久久久久久久| www.亚洲免费av| 懂色中文一区二区在线播放| 久久超碰97中文字幕| 免费视频最近日韩| 全国精品久久少妇| 免费三级欧美电影| 午夜国产不卡在线观看视频| 亚洲国产日产av| 国产激情精品久久久第一区二区 | www.欧美日韩国产在线| 国产v日产∨综合v精品视频| 精品一区二区国语对白| 日本中文一区二区三区| 日本免费新一区视频| 日韩av在线免费观看不卡| 日本不卡的三区四区五区| 婷婷丁香激情综合| 日本不卡一区二区三区| 日本亚洲天堂网| 蜜臀精品久久久久久蜜臀| 秋霞午夜av一区二区三区| 蜜臀av性久久久久蜜臀aⅴ四虎| 麻豆91在线看| 国产麻豆一精品一av一免费| 国产精品综合一区二区三区| 国产福利91精品一区二区三区| 国产一区二区三区免费在线观看| 韩国三级在线一区| 国产精品亚洲人在线观看| 国产精品18久久久| 99久久婷婷国产精品综合| 91福利资源站| 日韩免费观看高清完整版| 久久综合色之久久综合| 亚洲国产精品二十页| 亚洲伊人色欲综合网| 免费日本视频一区| 国产.精品.日韩.另类.中文.在线.播放| 国产高清不卡一区| 色成人在线视频| 欧美大片日本大片免费观看| 久久综合狠狠综合久久激情| 国产欧美一区二区精品秋霞影院| 国产精品区一区二区三| 亚洲一区二区三区精品在线| 激情深爱一区二区| 97精品国产露脸对白| 4438x成人网最大色成网站| 久久久不卡网国产精品二区| 亚洲人成精品久久久久| 青青草国产成人99久久| 成人免费黄色大片| 欧美日韩高清一区二区三区| 久久久噜噜噜久久中文字幕色伊伊| 亚洲成人av福利| 乱一区二区av| 91福利在线看| 久久综合五月天婷婷伊人| 一区二区三区中文免费| 国产一区999| 在线看不卡av| 欧美激情综合网| 奇米色一区二区| 色菇凉天天综合网| 欧美精品一区在线观看| 亚洲精品视频在线观看网站| 久久99精品国产麻豆不卡| 色哟哟在线观看一区二区三区| 日韩精品一区二区在线观看| 亚洲美女一区二区三区| 国产麻豆成人精品| 欧美日韩国产影片| 亚洲欧美影音先锋| 国产精品一级二级三级| 欧美一级在线视频| 亚洲bt欧美bt精品| 一本久久a久久免费精品不卡| 久久综合久久鬼色| 男女视频一区二区| 欧美日韩精品一二三区| 樱花草国产18久久久久| 丁香亚洲综合激情啪啪综合| 欧美一区二区三区色| 亚洲韩国一区二区三区| 99久久精品情趣| 中文字幕av资源一区| 国产原创一区二区三区| 91精品欧美久久久久久动漫| 亚洲自拍另类综合| 91国产成人在线| 一区二区三区成人在线视频| 懂色av中文字幕一区二区三区| 337p粉嫩大胆色噜噜噜噜亚洲| 免费亚洲电影在线| 日韩午夜小视频| 日本视频在线一区| 日韩一区二区三区在线观看| 亚洲国产sm捆绑调教视频| 91成人网在线| 伊人性伊人情综合网| 91亚洲精品久久久蜜桃网站 | 日本道免费精品一区二区三区| 国产精品视频观看| youjizz国产精品| 亚洲视频在线一区观看| 99国产精品久久久久| 亚洲欧洲日韩在线| 91蜜桃视频在线| 一区二区三区.www| 欧美日韩一本到| 青草av.久久免费一区| 欧美精品1区2区| 美女在线观看视频一区二区| 日韩视频免费观看高清在线视频| 日本网站在线观看一区二区三区 | 欧美性色黄大片| 视频一区二区三区入口| 日韩你懂的在线观看| 精品一区二区三区在线视频| 国产视频一区二区在线| 不卡一区在线观看| 一区二区在线观看免费| 欧美日本在线看| 激情成人午夜视频| 国产精品欧美极品| 在线观看国产一区二区| 日韩1区2区日韩1区2区| 久久精品视频免费| 91在线观看成人| 日本vs亚洲vs韩国一区三区二区| 久久亚洲综合色| 不卡av在线网| 舔着乳尖日韩一区| 国产日韩欧美精品综合|