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

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

?? imageadaptor2.cxx

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

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

  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
//
// This example illustrates how to use the \doxygen{ImageAdaptor}
// to access the individual components of an RGB image. In this case, we 
// create an ImageAdaptor that will accept a RGB image as input and 
// presents it as a scalar image. The pixel data
// will be taken directly from the red channel of the original image.
// 
// \index{itk::ImageAdaptor!Instantiation}
// \index{itk::ImageAdaptor!Header}
//
// Software Guide : EndLatex 

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


//  Software Guide : BeginLatex
//
//  As with the previous example, the bulk of the effort in creating the image 
//  adaptor is associated with the definition of the pixel accessor class. In 
//  this case, the accessor converts a RGB vector to a scalar containing the 
//  red channel component. Note that in the following, we do not need to define
//  the \code{Set()} method since we only expect the adaptor to be used for 
//  reading data from the image.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
class RedChannelPixelAccessor  
{
public:
  typedef itk::RGBPixel<float>   InternalType;
  typedef               float    ExternalType;

  static ExternalType Get( const InternalType & input ) 
    {
      return static_cast<ExternalType>( input.GetRed() );
    }
};
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
//  The \code{Get()} method simply calls the \code{GetRed()} method
//  defined in the \doxygen{RGBPixel} class.
//
//  Software Guide : EndLatex 


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

int main( int argc, char *argv[] ) 
{
  if( argc < 3 )
    {
    std::cerr << "Usage: " << std::endl;
    std::cerr << "ImageAdaptor2   inputRGBFileName outputRedChannelFileName" << std::endl;
    return -1;
    }


//  Software Guide : BeginLatex
//
//  Now we use the internal pixel type of the pixel accessor to define the
//  input image type, and then proceed to instantiate the ImageAdaptor type.
//
//  \index{PixelAccessor!RGB red channel}
//  \index{itk::ImageAdaptor!RGB red channel}
//  \index{ImageAdaptor!RGB red channel}
//
//  Software Guide : EndLatex 


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

  typedef itk::ImageAdaptor<  ImageType, 
                              RedChannelPixelAccessor > ImageAdaptorType;

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


//  Software Guide : BeginLatex
//
//  We create an image reader and connect the output to the adaptor
//  as before.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
  typedef itk::ImageFileReader< ImageType >   ReaderType;
  ReaderType::Pointer reader = ReaderType::New();  
// Software Guide : EndCodeSnippet

  reader->SetFileName( argv[1] );
  reader->Update();

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

//  Software Guide : BeginLatex
//
//  We create an \doxygen{RescaleIntensityImageFilter} and an
//  \doxygen{ImageFileWriter} to rescale the dynamic range of the pixel values
//  and send the extracted channel to an image file. Note that the image type
//  used for the rescaling filter is the \code{ImageAdaptorType} itself. That
//  is, the adaptor type is used in the same context as an image type.
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
  typedef itk::Image< unsigned char, Dimension >   OutputImageType;
  typedef itk::RescaleIntensityImageFilter< ImageAdaptorType, 
                                            OutputImageType 
                                               >   RescalerType;

  RescalerType::Pointer rescaler = RescalerType::New();
  typedef itk::ImageFileWriter< OutputImageType >   WriterType;
  WriterType::Pointer writer = WriterType::New();
// Software Guide : EndCodeSnippet


  writer->SetFileName( argv[2] );


//  Software Guide : BeginLatex
//
//  Finally, we connect the adaptor as the input to the rescaler and invoke the
//  \code{Update()} method on the writer.
//
//  Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
  rescaler->SetOutputMinimum(  0  );
  rescaler->SetOutputMaximum( 255 );

  rescaler->SetInput( adaptor );
  writer->SetInput( rescaler->GetOutput() );
  writer->Update();
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
//  ImageAdaptors for the green and blue channels can easily be implemented by
//  modifying the pixel accessor of the red channel and then using the
//  new pixel accessor for instantiating the type of an image adaptor. 
//  The following define a green channel pixel accessor.
//
//  \index{PixelAccessor!RGB green channel}
//  \index{itk::ImageAdaptor!RGB green channel}
//  \index{ImageAdaptor!RGB green channel}
//
//  Software Guide : EndLatex 


// Software Guide : BeginCodeSnippet
  class GreenChannelPixelAccessor  
  {
  public:
    typedef itk::RGBPixel<float>   InternalType;
    typedef               float    ExternalType;

    static ExternalType Get( const InternalType & input ) 
      {
        return static_cast<ExternalType>( input.GetGreen() );
      }
  };
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
// A blue channel pixel accessor is similarly defined.
//
//  \index{PixelAccessor!RGB blue channel}
//  \index{itk::ImageAdaptor!RGB blue channel}
//  \index{ImageAdaptor!RGB blue channel}
//
//  Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
  class BlueChannelPixelAccessor  
  {
  public:
    typedef itk::RGBPixel<float>   InternalType;
    typedef               float    ExternalType;

    static ExternalType Get( const InternalType & input ) 
      {
        return static_cast<ExternalType>( input.GetBlue() );
      }
  };
// Software Guide : EndCodeSnippet


//  Software Guide : BeginLatex
//
// \begin{figure} \center
// \includegraphics[width=0.24\textwidth]{VisibleWomanEyeSlice.eps}
// \includegraphics[width=0.24\textwidth]{VisibleWomanEyeSliceRedComponent.eps}
// \includegraphics[width=0.24\textwidth]{VisibleWomanEyeSliceGreenComponent.eps}
// \includegraphics[width=0.24\textwidth]{VisibleWomanEyeSliceBlueComponent.eps}
// \itkcaption[Image Adaptor to RGB Image]{Using
// ImageAdaptor to extract the components of an RGB image. The
// image on the left is a subregion of the Visible Woman cryogenic data set. 
// The red, green and blue components are shown from left to right as scalar 
// images extracted with an ImageAdaptor.}
// \label{fig:ImageAdaptorToRGBImage}
// \end{figure}
//
//
//  Figure~\ref{fig:ImageAdaptorToRGBImage} shows the result
//  of extracting the red, green and blue components from a region of the
//  Visible Woman cryogenic data set. 
//
//  Software Guide : EndLatex 


  return 0;
}



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青青伊人色综合久久| 欧美在线一区二区| 狠狠色综合日日| 日韩—二三区免费观看av| 一级日本不卡的影视| 国产精品久久久久国产精品日日| 精品国产百合女同互慰| 亚洲精品一区二区三区福利 | 久久精品亚洲精品国产欧美| 欧美一区中文字幕| 日韩一区二区在线免费观看| 日韩欧美成人一区二区| 精品国产一区二区精华 | 奇米色一区二区| 青青草原综合久久大伊人精品优势| 免费一级片91| 国产裸体歌舞团一区二区| 丰满岳乱妇一区二区三区| 成人一区二区三区中文字幕| 91亚洲精品久久久蜜桃| 在线观看一区二区视频| 欧美精品v日韩精品v韩国精品v| 欧美日韩成人在线| 精品播放一区二区| 中文字幕av免费专区久久| 亚洲精品菠萝久久久久久久| 午夜激情综合网| 激情av综合网| av不卡免费电影| 欧美日韩在线一区二区| 欧美tickle裸体挠脚心vk| 国产网红主播福利一区二区| 一区在线中文字幕| 五月天亚洲婷婷| 激情综合色综合久久综合| 波多野结衣的一区二区三区| 欧美美女视频在线观看| 久久无码av三级| 亚洲视频资源在线| 麻豆视频一区二区| 北条麻妃一区二区三区| 5月丁香婷婷综合| 亚洲精品乱码久久久久久| 91在线视频网址| 91极品视觉盛宴| 在线视频国内一区二区| 欧美日免费三级在线| 91麻豆精品国产91久久久资源速度 | 经典一区二区三区| 国产精品久久一级| 亚洲小说欧美激情另类| 国内精品国产成人国产三级粉色 | 色综合久久中文综合久久牛| 欧美高清视频在线高清观看mv色露露十八| 日韩精品中文字幕在线一区| 亚洲天堂免费看| 精品无人区卡一卡二卡三乱码免费卡| av成人老司机| 欧美成人一区二区| 亚洲老妇xxxxxx| 国产老妇另类xxxxx| 欧美日韩亚洲另类| 国产精品你懂的在线欣赏| 五月天视频一区| youjizz久久| 精品不卡在线视频| 亚洲gay无套男同| av中文字幕一区| 久久无码av三级| 免费一级片91| 欧美日韩久久久| 综合av第一页| 国产电影一区二区三区| 91精品婷婷国产综合久久竹菊| 中文字幕日韩精品一区| 国产精品资源网站| 欧美一区二区三区免费大片| 亚洲综合视频在线观看| aaa欧美大片| 国产欧美日韩卡一| 国产麻豆一精品一av一免费 | 久久蜜臀中文字幕| 日本欧美一区二区三区| 欧美三级乱人伦电影| 最新日韩在线视频| 国产成人一区在线| 久久精品在这里| 国精产品一区一区三区mba视频| 欧美群妇大交群中文字幕| 亚洲免费观看视频| 不卡一卡二卡三乱码免费网站| 日韩欧美国产电影| 蜜桃精品视频在线| 91精品久久久久久久99蜜桃| 亚洲国产美女搞黄色| 在线观看欧美日本| 亚洲午夜免费视频| 欧美撒尿777hd撒尿| 亚洲自拍欧美精品| 色综合激情五月| 夜夜亚洲天天久久| 欧美亚洲综合在线| 亚洲国产欧美日韩另类综合 | 欧美精品久久天天躁| 亚洲一区av在线| 欧美日韩在线一区二区| 爽好多水快深点欧美视频| 欧美精品九九99久久| 日韩电影免费在线看| 69精品人人人人| 免费看日韩a级影片| 日韩欧美国产综合| 国产综合一区二区| 欧美经典三级视频一区二区三区| 成人午夜视频在线| 中文字幕一区二区三区乱码在线| 91在线视频观看| 亚洲色欲色欲www| 欧美三级日本三级少妇99| 亚洲成人福利片| 欧美一级淫片007| 狠狠色丁香久久婷婷综合_中| 欧美精品一区二区三区蜜臀| 国产精品自拍在线| 中文字幕在线观看一区| 在线观看日韩一区| 蜜桃精品在线观看| 亚洲国产精品av| 91成人在线精品| 蜜臀av国产精品久久久久| 久久综合九色综合97_久久久| 国产精品一区二区三区四区| 亚洲特级片在线| 欧美日韩国产一二三| 国产综合成人久久大片91| 国产精品久久久久久久久免费桃花| 欧洲另类一二三四区| 蜜臀久久99精品久久久久宅男 | 国产一区二区三区黄视频| 国产精品欧美一级免费| 在线观看日韩av先锋影音电影院| 日本不卡的三区四区五区| 中文久久乱码一区二区| 欧美三级三级三级| 国产精品一区一区| 亚洲一区二区影院| 久久婷婷成人综合色| 91高清视频在线| 国产最新精品免费| 亚洲一区二区综合| 国产日韩欧美精品综合| 欧美色综合久久| 国产成人日日夜夜| 丝袜美腿亚洲一区二区图片| 国产欧美日韩综合精品一区二区| 欧美在线免费视屏| 韩国精品免费视频| 亚洲精品国产品国语在线app| 日韩精品一区二区三区在线观看 | 亚洲综合一区二区精品导航| 精品999在线播放| 欧美日韩一区二区三区在线| 国产精品亚洲а∨天堂免在线| 一区二区三区欧美亚洲| 26uuu成人网一区二区三区| 欧洲一区二区三区免费视频| 国产成人av资源| 蜜桃精品视频在线| 亚洲综合久久久| 国产三级精品三级| 欧美一区二区高清| 在线亚洲精品福利网址导航| 国产在线精品一区二区| 亚洲国产一区二区三区| 国产精品久久久久久久久搜平片| 精品欧美黑人一区二区三区| 欧美亚洲一区二区在线| 成人精品小蝌蚪| 国产一区二区h| 日韩在线观看一区二区| 亚洲色图一区二区三区| 欧美激情综合五月色丁香| 欧美大片在线观看一区二区| 欧美日韩高清一区二区| 99久久国产综合色|国产精品| 国产乱妇无码大片在线观看| 免费观看在线色综合| 亚洲成年人影院| 亚洲一区二区三区美女| 日韩理论片一区二区| 国产欧美1区2区3区| 精品三级在线观看| 日韩欧美亚洲另类制服综合在线| 欧美性猛片xxxx免费看久爱| 99国产精品久久久久| 懂色av一区二区在线播放| 国产一区二区成人久久免费影院| 久久电影网站中文字幕| 久久69国产一区二区蜜臀| 免费观看一级欧美片|