View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0008680 | ITK | public | 2009-03-06 09:35 | 2010-10-21 12:32 | |||||
Reporter | Bryn Lloyd | ||||||||
Assigned To | kentwilliams | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | ITK-3-12 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0008680: Output Spacing etc. is not set in ReinitializeLevelSetImageFilter | ||||||||
Description | The output information (spacing, origin, etc.) is not set in the ReinitializeLevelSetImageFilter. The reason why I believe this is the case is that when I pass an image with spacings [0.1, 0.1, 0.5]mm I get distance value around 1.0mm, while corresponding distance values (from a distance map) are approx. 0.1mm. The code in ReinitializeLevelSetImageFilter.txx uses the FastmarchingFilter internally. It is necessary to set the output information in the FastmarchingFilter. However, it does NOT set the OutputSpacing and Origin of the FastMarching object, i.e. this must be BUG. | ||||||||
Additional Information | This code should fix the problem: void ReinitializeLevelSetImageFilter<TLevelSet> ::GenerateData() { this->AllocateOutput(); //****** NEW ****** this->m_Marcher->SetOutputOrigin(this->GetInput()->GetOrigin()); this->m_Marcher->SetOutputDirection(this->GetInput()->GetDirection()); this->m_Marcher->SetOutputSpacing(this->GetInput()->GetSpacing()); //****** NEW ****** if( m_NarrowBanding ) { this->GenerateDataNarrowBand(); } else { this->GenerateDataFull(); } } | ||||||||
Tags | No tags attached. | ||||||||
Resolution Date | |||||||||
Sprint | |||||||||
Sprint Status | |||||||||
Attached Files | ReinitializeLevelSetImageFilter.cxx [^] (3,920 bytes) 2009-03-06 09:41 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0015807) kentwilliams (developer) 2009-03-26 17:43 |
I am looking at your suggested fix. I moved the suggested additions up into AllocateOutput, where the MarchingCubes instance already has its output size set. You could help me out by suggesting a possible regression test of this bug -- i.e. something that fails now that would succeed if this was fixed. I'm looking in itkReinitializeLevelSetImageFilterTest.cxx (in Insight/Testing/Code/Algorithms) and it looks like the test leave the spacing and dir cosines at their default values, i.e. 1,1,1 and identity. Would it be sufficient to replicate this test, but assign non-default directions and spacing? Or do you have a succinct test in mind. |
(0015810) Bryn Lloyd (reporter) 2009-03-27 03:52 |
I would suggest following (very simple) test, in order to verify that the spacing is used: Run the ReinitializeLevelSetImageFilter with an in image with spacing (1,1,1) and then run another instance with the "same" image, but now with a modified spacing of (0.1,0.1,0.1). Test if the result is scaled by 0.1 in the second instance. At the same time the image origin could also be changed and checked. |
(0015876) kentwilliams (developer) 2009-03-31 15:42 |
I added the suggested code to the filter. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-03-06 09:35 | Bryn Lloyd | New Issue | |
2009-03-06 09:41 | Bryn Lloyd | File Added: ReinitializeLevelSetImageFilter.cxx | |
2009-03-26 17:29 | kentwilliams | Relationship added | related to 0008058 |
2009-03-26 17:29 | kentwilliams | Status | new => assigned |
2009-03-26 17:29 | kentwilliams | Assigned To | => kentwilliams |
2009-03-26 17:43 | kentwilliams | Note Added: 0015807 | |
2009-03-27 03:52 | Bryn Lloyd | Note Added: 0015810 | |
2009-03-31 15:42 | kentwilliams | Note Added: 0015876 | |
2009-03-31 15:42 | kentwilliams | Status | assigned => resolved |
2009-03-31 15:42 | kentwilliams | Resolution | open => fixed |
2010-10-21 12:32 | Gabe Hart | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |