[vtkusers] vtkDICOMImageReader and an extrange error,..

Miguel Angel Rodriguez Florido marf at itccanarias.org
Mon Mar 16 07:26:00 EDT 2009


	Hi Dongqing,

	thank you very much for your mail, but actually this is not my problem. 
I don't know what is happening.

	Perhaps, you are right and the dicom data that I'm trying to read is 
"extrange",..in any case, I don't understand why I got:

	"No memory allocated for image data!"

	Best.

Dongqing Chen wrote:
> Hello, Miguel:
> 
>  The C code patch has been tested just recently, it reads all the all 
> the DICOM Image, and shows slice-by-slice an independent window.
> 
>  it works well for me. Hopefully it helps.
> 
> //----------------------------------------------------------------------------------------------------------------------------------------- 
> 
>    vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
>    vtkImageViewer *viewer = vtkImageViewer::New();
> 
>     reader->SetDirectoryName(dirName);//change to the folder where your 
> docom images are saved.
> 
>    viewer->SetInput(reader->GetOutput());
>    reader->Update();
> 
>    double *dicom_range = reader->GetOutput()->GetScalarRange(); //max 
> and mim CT number in Hounsfiled
> 
>    int num_slices = viewer->GetWholeZMax ();
> 
>     for (int i=0;i<=num_slices;i++)
>     {
> 
>      int dicom_width=reader->GetWidth();
>       int dicom_height=reader->GetHeight();
>       double *dicom_spacing=reader->GetPixelSpacing();
>       const char *dicom_patient_name=reader->GetPatientName();
> 
>    printf("-------------------------------------------------\n");
>    printf("This Is Slice Number %d out of Total %d\n", i,num_slices);
>    printf("Some Basic Info for Slice Number %d \n", i);
>    printf("Weight=%d \n", dicom_width);
>    printf("Height=%d \n", dicom_height);
>    printf("Spatial Resoltion=[%5.3f,%5.3f,%5.3f]\n", 
> dicom_spacing[0],dicom_spacing[1],dicom_spacing[2]);
>    printf("-------------------------------------------------\n");
> 
> 
>       viewer->SetZSlice(i);
>       viewer->GetRenderer()->ResetCameraClippingRange();
>       viewer->SetColorWindow(400);
>       viewer->SetColorLevel(128);
> 
>       viewer->Render();
> }
> 
>     printf("Max and Min Pixel Values for the Whole 
> Dataset=[%9.3f,%9.3f]\n", dicom_range[1],dicom_range[0]);
> 
>     reader->Delete();
>     viewer->Delete();
> //---------------------------------------------------------------------------------------------------------------------------------- 
> 
> 
> 
> Best Wishes,
> ----------------------------------------------------------------------------- 
> 
> Dongqing Chen, Ph.D.
> Computer Vision & Image Processing (CVIP) Lab
> Department of Electrical & Computer Engineering
> Speed School of Engineering
> University of Louisville
> Louisville, KY, 40292
> U.S.A
> email: dqchen at cvip.louisville.edu
> phone: 1-502-852-2789 (Lab)
>             1-502-852-6130 (Office)
> ---------------------------------------------------------------------------- 
> 
> ----- Original Message ----- From: "Miguel Angel Rodriguez Florido" 
> <marf at itccanarias.org>
> To: <vtkusers at vtk.org>
> Sent: Friday, March 13, 2009 9:01 AM
> Subject: [vtkusers] vtkDICOMImageReader and an extrange error,..
> 
> 
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at 
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: 
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> 
> 
> 


-- 
Miguel Angel Rodríguez Florido
Departamento de Ingeniería del Software
División de Investigación y Desarrollo Tecnológico
INSTITUTO TECNOLOGICO DE CANARIAS, S.A. - GOBIERNO DE CANARIAS
URL: www.itccanarias.org Tlfno: +34 928 727548, Fax: +34 928 727517

--------------------------------------------------------------------------
AVISO LEGAL:
Este mensaje y los ficheros adjuntos si los hubiere, se dirigen 
exclusivamente a su destinatario y puede contener información 
privilegiada o confidencial. La transmisión errónea del presente mensaje 
en ningún momento supone renuncia a su confidencialidad. Si no es vd. el 
destinatario indicado, queda notificado de que la utilización, 
divulgación y/o copia sin autorización está prohibida en virtud de la 
legislación vigente. Si ha recibido este mensaje por error, le rogamos 
que nos lo comunique inmediatamente por esta misma vía y proceda a su 
destrucción.

LEGAL WARNING:
This message and the files attached if there were any, are intended 
exclusively for its addressee and may contain information that is 
CONFIDENTIAL and protected by professional privilege. A wrong 
transmission to this message don't suppose we relinquished to It's 
confidential. If you are not the intended recipient you are hereby 
notified that any dissemination, copy or disclosure of this 
communication is strictly prohibited by law. If this message has been 
received in error, please immediately notify us via e-mail and delete it.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3262 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090316/a522bd51/attachment.bin>


More information about the vtkusers mailing list