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

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

?? imageadaptor4.cxx

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

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

  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.

=========================================================================*/

#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif


// Software Guide : BeginLatex
//
// Image adaptors can also be used to perform simple pixel-wise computations 
// on image data. The following example illustrates how to use the 
// \doxygen{ImageAdaptor} for image thresholding.
//
// \index{itk::ImageAdaptor!Instantiation}
// \index{itk::ImageAdaptor!Header}
// \index{itk::ImageAdaptor!performing computation}
// \index{itk::PixelAccessors!with parameters}
// \index{itk::PixelAccessors!performing computation}
//
// Software Guide : EndLatex 

#include "itkImage.h"
#include "itkImageAdaptor.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "itkRescaleIntensityImageFilter.h"


//  Software Guide : BeginLatex
//
//  A pixel accessor for image thresholding requires that the accessor
//  maintain the threshold value. Therefore, it must also implement the
//  assignment operator to set this internal parameter.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
class ThresholdingPixelAccessor  
{
public:
  typedef unsigned char      InternalType;
  typedef unsigned char      ExternalType;

  ExternalType Get( const InternalType & input ) const 
    {
      return (input > m_Threshold) ? 1 : 0;
    }
  void SetThreshold( const InternalType threshold )
    {
      m_Threshold = threshold;
    }

  void operator=( const ThresholdingPixelAccessor & vpa )
    {
      m_Threshold = vpa.m_Threshold;
    }
private:
  InternalType m_Threshold;
};
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
//  The \code{Get()} method returns one if the input pixel is above
//  the threshold and zero otherwise. The assignment operator transfers 
//  the value of the threshold member
//  variable from one instance of the pixel accessor to another.
//
//  Software Guide : EndLatex 


//-------------------------
//
//   Main code
//
//-------------------------

int main( int argc, char *argv[] ) 
{
  if( argc < 4 )
    {
    std::cerr << "Usage: " << std::endl;
    std::cerr << "ImageAdaptor4   inputFileName outputBinaryFileName ";
    std::cerr << " thresholdValue" << std::endl;
    return -1;
    }


//  Software Guide : BeginLatex
//
//  To create an image adaptor, we first instantiate an image type
//  whose pixel type is the same as the internal pixel type of the pixel
//  accessor.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
  typedef ThresholdingPixelAccessor::InternalType     PixelType;
  const   unsigned int   Dimension = 2;
  typedef itk::Image< PixelType,  Dimension >   ImageType;
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
//  We instantiate the ImageAdaptor using the image type as the
//  first template parameter and the pixel accessor as the second template
//  parameter.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
  typedef itk::ImageAdaptor<  ImageType, 
                              ThresholdingPixelAccessor > ImageAdaptorType;

  ImageAdaptorType::Pointer adaptor = ImageAdaptorType::New();
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
//  The threshold value is set from the command line. A threshold
//  pixel accessor is created and connected to the image adaptor
//  in the same manner as in the previous example.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
  ThresholdingPixelAccessor  accessor;
  accessor.SetThreshold( atoi( argv[3] ) );
  adaptor->SetPixelAccessor( accessor );
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
//  We create a reader to load the input image and connect the output
//  of the reader as the input to the adaptor.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
  typedef itk::ImageFileReader< ImageType >   ReaderType;
  ReaderType::Pointer reader = ReaderType::New();  
  reader->SetFileName( argv[1] );
  reader->Update();

  adaptor->SetImage( reader->GetOutput() );
//  Software Guide : EndCodeSnippet 


  typedef itk::RescaleIntensityImageFilter< ImageAdaptorType, 
                                            ImageType > RescalerType;

  RescalerType::Pointer rescaler = RescalerType::New();
  typedef itk::ImageFileWriter< ImageType >   WriterType;
  WriterType::Pointer writer = WriterType::New();


  writer->SetFileName( argv[2] );

  rescaler->SetOutputMinimum(  0  );
  rescaler->SetOutputMaximum( 255 );

  rescaler->SetInput( adaptor );
  writer->SetInput( rescaler->GetOutput() );
  writer->Update();


//  Software Guide : BeginLatex
//
// \begin{figure} \center
// \includegraphics[width=0.32\textwidth]{BrainProtonDensitySlice.eps}
// \includegraphics[width=0.32\textwidth]{ImageAdaptorThresholdingA.eps}
// \includegraphics[width=0.32\textwidth]{ImageAdaptorThresholdingB.eps}
// \itkcaption[Image Adaptor for performing computations]{Using
// ImageAdaptor to perform a simple image computation. An
// ImageAdaptor is used to perform binary thresholding on
// the input image on the  left. The center image was created using a 
// threshold of 180, while the
// image on the right corresponds to a  threshold of 220.}
// \label{fig:ImageAdaptorThresholding}
// \end{figure}
//
//  As before, we rescale the emulated scalar image before writing it
//  out to file.
//  Figure~\ref{fig:ImageAdaptorThresholding} illustrates the result of
//  applying the thresholding adaptor to a typical gray scale image using two
//  different threshold values. Note that the same effect could have been
//  achieved by using the \doxygen{BinaryThresholdImageFilter} but at the
//  price of holding an extra copy of the image in memory.
//
//  Software Guide : EndLatex 


  return 0;
}



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美96一区二区免费视频| 无码av免费一区二区三区试看| 精品久久久久一区二区国产| 欧美无人高清视频在线观看| 一本一道综合狠狠老| 91天堂素人约啪| 色婷婷久久99综合精品jk白丝| 日本精品一级二级| 欧美午夜片在线看| 日韩视频一区二区三区| 久久天堂av综合合色蜜桃网| 久久精品男人的天堂| 中文字幕五月欧美| 一区二区三区鲁丝不卡| 日韩专区欧美专区| 国内成+人亚洲+欧美+综合在线| 国产美女一区二区三区| 91麻豆国产精品久久| 欧美日韩成人综合| 久久久噜噜噜久久中文字幕色伊伊| 国产欧美精品一区| 亚洲一区二区四区蜜桃| 久久成人羞羞网站| 97久久精品人人做人人爽50路| 在线视频一区二区三区| 日韩视频免费直播| 亚洲欧美在线视频观看| 日韩—二三区免费观看av| 国产suv精品一区二区6| 日本黄色一区二区| 精品少妇一区二区| 一区二区三区在线观看网站| 久久99精品久久久久久| 一本在线高清不卡dvd| 欧美zozo另类异族| 亚洲综合在线第一页| 国产综合色精品一区二区三区| 色成人在线视频| 国产午夜精品理论片a级大结局| 亚洲男人天堂av| 紧缚捆绑精品一区二区| 欧美在线一二三四区| 国产欧美一区二区精品秋霞影院| 午夜日韩在线观看| 91美女福利视频| 2014亚洲片线观看视频免费| 亚洲精品免费看| 懂色av中文一区二区三区| 久久综合九色综合欧美就去吻| 亚洲自拍都市欧美小说| 日韩va欧美va亚洲va久久| 成人晚上爱看视频| 欧美精品一区二区三区蜜桃视频| 一区二区三区精品在线| 成人深夜视频在线观看| 欧美电影免费观看高清完整版在线观看| 国产精品不卡一区| 国产一区二区三区电影在线观看 | 美女视频黄久久| 91精品办公室少妇高潮对白| 国产精品青草久久| 国产成人午夜片在线观看高清观看| 欧美一区二区三区视频免费 | 95精品视频在线| 久久精品在线免费观看| 久久99精品国产麻豆不卡| 91精品一区二区三区久久久久久| 亚洲午夜在线电影| 日本精品免费观看高清观看| 亚洲免费av网站| www.欧美日韩| 亚洲欧美电影一区二区| 色婷婷综合久色| 亚洲另类中文字| 欧美亚洲国产一卡| 亚洲成人av资源| 欧美日韩日本视频| 日韩av成人高清| 日韩欧美电影在线| 久久99精品久久久久久国产越南 | 色综合久久久久综合体| 亚洲三级免费电影| 日本高清视频一区二区| 亚洲最大成人网4388xx| 91.麻豆视频| 黑人巨大精品欧美黑白配亚洲| 久久综合一区二区| 99久久免费视频.com| 亚洲精品国产成人久久av盗摄| 欧美日韩1234| 黄色成人免费在线| 国产精品久久久久久久第一福利| 91麻豆国产自产在线观看| 三级成人在线视频| 精品三级在线观看| 国产jizzjizz一区二区| 亚洲午夜国产一区99re久久| 日韩免费性生活视频播放| 国产成人自拍网| 亚洲一区在线播放| 精品99一区二区三区| av在线不卡免费看| 日韩高清不卡一区二区| 中文字幕的久久| 91精品国产综合久久蜜臀| 国产成人精品免费网站| 亚洲成人在线免费| 久久精品水蜜桃av综合天堂| 欧美怡红院视频| 国产成人av一区二区三区在线| 亚洲欧美经典视频| 精品国产伦理网| 欧美日韩午夜影院| 东方aⅴ免费观看久久av| 天堂资源在线中文精品| 欧美极品aⅴ影院| 欧美一级一区二区| 91国产精品成人| 国产69精品久久99不卡| 蜜桃av一区二区| 亚洲一区二区三区美女| 国产精品久久久久久妇女6080 | 91视频一区二区| 国产乱子轮精品视频| 免费人成精品欧美精品| 一区二区三区在线免费播放| 亚洲国产精品黑人久久久| 日韩一级在线观看| 欧美在线影院一区二区| 99国产精品99久久久久久| 精彩视频一区二区| 国产一区二区免费在线| 日韩中文字幕不卡| 亚洲综合无码一区二区| 自拍视频在线观看一区二区| 久久精品99国产精品| 久久日一线二线三线suv| 日本精品免费观看高清观看| 国产高清不卡二三区| 美国精品在线观看| 天天综合网 天天综合色| 一区二区在线观看免费视频播放| 中文字幕高清不卡| 国产精品你懂的在线欣赏| 2022国产精品视频| 精品国产乱码久久| 欧美大片拔萝卜| 欧美一区二区三区在线电影| 91精品国产91热久久久做人人| 欧美亚洲丝袜传媒另类| 91国偷自产一区二区开放时间| 色综合天天做天天爱| 91视频精品在这里| 欧美亚洲综合另类| 欧美日本在线观看| 91精品国产综合久久久久久| 欧美日韩黄色影视| 欧美一三区三区四区免费在线看| 欧美一区三区二区| 久久久久久久久久久久电影| 久久亚洲一区二区三区四区| 久久影院视频免费| 国产欧美日韩久久| 欧美激情在线一区二区| 亚洲视频在线观看一区| 亚洲精品大片www| 天天亚洲美女在线视频| 美国毛片一区二区| 国产精品 欧美精品| 97久久精品人人做人人爽50路| 欧美最猛黑人xxxxx猛交| 日韩欧美一区二区视频| 亚洲国产精品国自产拍av| 亚洲综合在线观看视频| 日本不卡视频在线| 国产a视频精品免费观看| 欧美综合天天夜夜久久| 欧美变态凌虐bdsm| 亚洲人成亚洲人成在线观看图片 | 7777女厕盗摄久久久| 久久久亚洲午夜电影| 亚洲蜜臀av乱码久久精品| 日本欧美肥老太交大片| 成人午夜视频免费看| 欧美日韩亚州综合| 中文字幕国产一区二区| 天堂精品中文字幕在线| 成人三级伦理片| 欧美巨大另类极品videosbest| 精品国产制服丝袜高跟| 亚洲综合在线视频| 国产成人av福利| 欧美精品在欧美一区二区少妇| 国产精品你懂的| 久久91精品久久久久久秒播| 色丁香久综合在线久综合在线观看| 日韩美女视频一区二区在线观看| 亚洲情趣在线观看| 国产成人免费在线| 欧美一区二区三区四区在线观看|