[Insight-users] Retrieving the number of dimensions and dataype from an image

Vijay Prashanth vijay_prashanth at mindtree.com
Tue Oct 19 00:22:12 EDT 2004


Hi Everybody,
 
I am storing a  (512*512)  2D array of unsigned char into an
itk::Image<unsigned char, 2> as in the following pseudocode
 
itk::ImportImageContainer<long unsigned int, unsgned char> Pointer import;
//initialise and reserve code

 import = itk::ImportImageContainer<long unsigned int, unsigned char>::New();

 import->SetImportPointer(pointer_to_dataarray,512,true);
 
itk::Image<unsigned char, 2> *img = itk::Image<unsigned char, 2>::New();
 img->SetPixelContainer(import);

Now I want to retrieve the information from the image and remake the array,
does any body knows how to retrieve the number of dimensions, dataype and
other info  from the already formed image.
 
Thanks in advance,
Vijay.
-------------- next part --------------
-----------------------------------------------------------------------------------------------------------------------------
Disclaimer
-----------------------------------------------------------------------------------------------------------------------------

"This message(including attachment if any)is confidential and may be privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If you have received this message by mistake please notify the sender by return  e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.  Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission."

-----------------------------------------------------------------------------------------------------------------------------


More information about the Insight-users mailing list