[Insight-users] Using MultiResolutionPyramidImageFilter :
Tamas Ungi
utamas at tipomed.hu
Sun Aug 5 04:33:40 EDT 2007
Dear All,
I have encountered the same problem with MultiResolutionPyramid, could
anyone help me?
No output is generated by the writer.
The code is:
typedef itk::Image< unsigned char, 2 > Image;
typedef itk::ImageFileReader< Image > Reader;
typedef itk::ImageFileWriter< Image > Writer;
// read image
Reader::Pointer reader = Reader::New();
reader->SetFileName( argv[1] );
reader->Update();
Image::Pointer image = reader->GetOutput();
image->Print( std::cout );
// construct a pyramid
typedef itk::MultiResolutionPyramidImageFilter< Image, Image > Pyramid;
Pyramid::Pointer pyramid = Pyramid::New();
pyramid->SetNumberOfLevels( 3 );
pyramid->SetInput( reader->GetOutput() );
pyramid->Print( std::cout );
pyramid->Update();
// write pyramid
Writer::Pointer writer = Writer::New();
writer->SetFileName( "out.bmp" );
writer->SetInput( pyramid->GetOutput( 1 ) );
writer->Update();
Output is:
Image (0x8ec8fa0)
RTTI typeinfo: itk::Image<unsigned char, 2u>
Reference Count: 2
Modified Time: 106
Debug: Off
Observers:
none
Source: (0x8ec68c8)
Source output index: 0
Release Data: Off
Data Released: False
Global Release Data: Off
PipelineMTime: 10
UpdateMTime: 107
LargestPossibleRegion:
Dimension: 2
Index: [0, 0]
Size: [512, 512]
BufferedRegion:
Dimension: 2
Index: [0, 0]
Size: [512, 512]
RequestedRegion:
Dimension: 2
Index: [0, 0]
Size: [512, 512]
Spacing: [1, 1]
Origin: [0, 0]
Direction:
1 0
0 1
PixelContainer:
ImportImageContainer (0x8ec9078)
RTTI typeinfo: itk::ImportImageContainer<unsigned long, unsigned
char>
Reference Count: 1
Modified Time: 104
Debug: Off
Observers:
none
Pointer: 0x8ec90a8
Container manages memory: true
Size: 262144
Capacity: 262144
MultiResolutionPyramidImageFilter (0x8eccce0)
RTTI typeinfo:
itk::MultiResolutionPyramidImageFilter<itk::Image<unsigned char, 2u>,
itk::Image<unsigned char, 2u> >
Reference Count: 1
Modified Time: 135
Debug: Off
Observers:
none
Number Of Required Inputs: 1
Number Of Required Outputs: 3
Number Of Threads: 1
ReleaseDataFlag: Off
ReleaseDataBeforeUpdateFlag: Off
Input 0: (0x8ec8fa0)
Output 0: (0x8ecd138)
Output 1: (0x8eca5e8)
Output 2: (0x8eca718)
AbortGenerateData: Off
Progress: 0
Multithreader:
RTTI typeinfo: itk::MultiThreader
Reference Count: 1
Modified Time: 109
Debug: Off
Observers:
none
Thread Count: 1
Global Maximum Number Of Threads: 0
MaximumError: 0.1
No. levels: 3
Schedule:
[4, 4]
[2, 2]
[1, 1]
terminate called after throwing an instance of 'itk::ExceptionObject'
what():
/home/tom/src/InsightToolkit-3.2.0/Code/Common/itkMultiThreader.cxx:368:
itk::ERROR: MultiThreader(0x8edab80): Exception occurred during
SingleMethodExecute
Aborted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070805/ece07b3d/attachment.html
More information about the Insight-users
mailing list