Hello list,

the problem seems to be solved. I originally used a real VTK pipeline 
after loading the image. Then VTK complained about the NULL data at the 
beginning of the pipeline. Now I am using the mitk::ImageToSurfaceFilter 
instead which I reckon does basically the same like my VTK pipeline but 
does not complain about the data and I am able to display it. I am a bit 
puzzled here, but it seems to work in the end.

Cheers, Marcel



Marcel Schenderlein schrieb:
> Hello list,
> 
> first of all I want to give some props to the MITK makers for the new 
> release. The new features look promising. I came back to MITK after a 
> while of doing other work.
> 
> After compiling my application with the new MITK (0.9.3) I ran into a 
> problem though.
> 
> Loading a VTK file (VTK Dataset Structured Points, I attached the header 
> at the end of the mail) does not seem to work correctly. The image is 
> just a segmented volume with 0s, 1s and 2s. I am doing the following 
> (which worked with the older MITK):
> 
> // -- try to read the file
> mitk::DataTreeNodeFactory::Pointer reader =
>      mitk::DataTreeNodeFactory::New();
> try {
>    reader->SetFileName(filename.ascii());
>    reader->Update();
> } catch(...) {
>    // some error handling...
>    return;
> }
> 
> // -- open segmentation image
> mitk::Image::Pointer segmentationImage =
>      dynamic_cast<mitk::Image*>(reader->GetOutput()->GetData());
> 
> if (segmentationImage.IsNull()) {
>    // some more error handling... is not reached in this case!!!
>    return;
> }
> 
> 
> The strange thing is that I do get a segmentationImage which is not 
> null. In debug mode I can see that the segmentationImage contains all 
> the correct dimension, spacing, etc. information, simply the image data 
> is missing (segmentationImage.m_CompleteData.m_Pointer=0x000000). This 
> naturally produces errors further down the pipeline.
> 
> Notice that when I use the Open dialog of the MainApp loading works 
> perfectly!
> 
> Any ideas what is going on here? Thanks in advance!
> 
> Cheers, Marcel
> 
> 
> 
> 
> 
> # vtk DataFile Version 3.0
> VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)
> BINARY
> DATASET STRUCTURED_POINTS
> DIMENSIONS 256 256 100
> SPACING 1.0000000000000000e+000 1.0000000000000000e+000 
> 1.0000008344650269e+000
> ORIGIN -1.2708883666992188e+002 -5.5723289489746094e+001 
> 1.3431561279296875e+002
> POINT_DATA 6553600
> SCALARS scalars unsigned_char 1
> LOOKUP_TABLE default
> 
> 
> 
> 

-- 
---------------------------------------------
Dipl.-Ing. Marcel Schenderlein
Institute of Measurement, Control and Microtechnology
Ulm University
Albert Einstein Allee 41
89081 Ulm, Germany

Phone:  +49 (0) 731 50 26338
FAX:    +49 (0) 731 50 26301
Mobile: +49 (0) 176 217 33668

Email: [EMAIL PROTECTED]
web:   http://www.uni-ulm.de/in/mrm

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to