[Insight-users] pointer to get the raw data

Luis Ibanez luis.ibanez at kitware.com
Fri Jul 4 13:24:21 EDT 2008


Hi Lee, Subrahmanyam,



You may want to try:


     reader->Update();

     ImageType::ConstPointer image = reader->GetOuput();

     const PixelType * buffer = image->GetBufferPointer();


Regards,


     Luis


------------------------
Subrahmanyam Gorthi wrote:
> Dear Woo-jin,
> 
>  >> e.g. when I using the itkImageSeriesReader   and loaded the series 
> of PNG image
>  >> how can I get the pointer to the raw data?
> 
> I am afraid I did not understand your query correctly.
> 
> You can look into the example on itkImageSeriesReader available at:
> ITK\Examples\IO\DicomSeriesReadPrintTags.cxx
> 
> The code looks like this:
> typedef  itk::Image< PixelType, Dimension >      ImageType;
> typedef  itk::ImageSeriesReader< ImageType >  ReaderType
> ReaderType::Pointer reader = ReaderType::New();
> 
> // Then generate the file names using the FileGetInputFieNames, as in 
> the example.
> reader->SetFileNames( fileNames );
>  reader->Update();
> 
> You do not have to seperately get the pointer to the loaded image;
> the variable "reader" itself is the pointer to your raw data.
> 
> Does that answer your question?
> 
> Warm regards,
> Subrahmanyam Gorthi.
> 
> 
> 
> 
> On Fri, Jul 4, 2008 at 3:39 PM, LeeWoojin <lwj0616 at naver.com 
> <mailto:lwj0616 at naver.com>> wrote:
> 
>     Hello  ITK users.
> 
>      
> 
>      
> 
>     I just want to get the pointer to the raw data.
> 
>      
> 
>     e.g. when I using the itkImageSeriesReader   and loaded the series
>     of PNG image
> 
>      
> 
>     how can I get the pointer to the raw data?
> 
>      
> 
>     I want to use it with MFC for GUI. I research the itkRegMFC example.
>     but it write to file and re-loaded using CImage class
> 
>      
> 
>     It's not suitability for seriesImage.
> 
>      
> 
>     so, could you give me the hint that how can I get the pointer to get
>     the raw data.
> 
>      
> 
>     thank you.
> 
>      
> 
>      
> 
>     Woo-jin
> 
>     <http://www.naver.com/>
>     <http://happybean.naver.com/main/SectionMain.nhn>
> 
> 
>     _______________________________________________
>     Insight-users mailing list
>     Insight-users at itk.org <mailto:Insight-users at itk.org>
>     http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list