Reg23 ROI
- fixed the known issue of ROI not defined automatically before interaction - whole region is used as default, until user changes that - reset on patient unload, the next one should start again from full region.
This commit is contained in:
@ -388,6 +388,8 @@ int itkImageProcessor::unload3DVolumeAndMeta(){
|
||||
m_TransformMetaInfo = TransformMetaInformation::New();
|
||||
|
||||
|
||||
this->ResetROIRegions();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -2500,11 +2502,13 @@ void itkImageProcessor::SetRegionFixed2(
|
||||
|
||||
void itkImageProcessor::ResetROIRegions(){
|
||||
|
||||
auto region1temp = m_PASourceDupli->GetOutput()->GetBufferedRegion();
|
||||
auto region2temp = m_LATSourceDupli->GetOutput()->GetBufferedRegion();
|
||||
// auto region1temp = m_PASourceDupli->GetOutput()->GetBufferedRegion();
|
||||
// auto region2temp = m_LATSourceDupli->GetOutput()->GetBufferedRegion();
|
||||
|
||||
this->m_R23->SetroiAutoReg1(region1temp);
|
||||
this->m_R23->SetroiAutoReg2(region2temp);
|
||||
// this->m_R23->SetroiAutoReg1(region1temp);
|
||||
// this->m_R23->SetroiAutoReg2(region2temp);
|
||||
|
||||
this->m_R23->setROISizeToZero();
|
||||
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,8 @@ itkReg23::itkReg23()
|
||||
// m_UseFullROI = true; // if the full image ROI shall be used
|
||||
m_UseDumptoFile = false; //If each (!) optimzer result shall be dumpped into a file.
|
||||
|
||||
|
||||
this->setROISizeToZero();
|
||||
}
|
||||
|
||||
|
||||
@ -54,6 +56,16 @@ itkReg23::~itkReg23()
|
||||
|
||||
}
|
||||
|
||||
void itkReg23::setROISizeToZero(){
|
||||
|
||||
ImageType3D::SizeType zeroSize;
|
||||
zeroSize.Fill(0);
|
||||
|
||||
m_roiAutoReg1.SetSize(zeroSize);
|
||||
m_roiAutoReg2.SetSize(zeroSize);
|
||||
|
||||
}
|
||||
|
||||
void itkReg23::PrintSelf(std::ostream& os, Indent indent) const
|
||||
{
|
||||
Superclass::PrintSelf(os, indent);
|
||||
@ -208,6 +220,18 @@ void itkReg23::InitializeRegistration(
|
||||
registration->SetFixedImage2(m_LAT);
|
||||
registration->SetMovingImage(m_Volume);
|
||||
|
||||
|
||||
if( this->GetroiAutoReg1().GetNumberOfPixels() == 0 ){
|
||||
auto defaultRegion = m_PA->GetBufferedRegion();
|
||||
this->SetroiAutoReg1(defaultRegion);
|
||||
std::cout<< "Image1 region not defined. Using the whole image buffered region" <<std::endl;
|
||||
}
|
||||
if( this->GetroiAutoReg2().GetNumberOfPixels() == 0 ){
|
||||
auto defaultRegion = m_LAT->GetBufferedRegion();
|
||||
this->SetroiAutoReg2(defaultRegion);
|
||||
std::cout<< "Image2 region not defined. Using the whole image buffered region" <<std::endl;
|
||||
}
|
||||
|
||||
registration->SetFixedImageRegion1(m_roiAutoReg1);
|
||||
registration->SetFixedImageRegion2(m_roiAutoReg2);
|
||||
|
||||
|
@ -108,6 +108,8 @@ public:
|
||||
|
||||
/** Auto Reg23 methods END */
|
||||
|
||||
void setROISizeToZero();
|
||||
|
||||
protected:
|
||||
itkReg23();
|
||||
virtual ~itkReg23();
|
||||
|
Reference in New Issue
Block a user