Skip to content
Snippets Groups Projects
Commit 6a97c14c authored by Julien Michel's avatar Julien Michel
Browse files

MRG: merging with 4.0.1

parents d21bb2fa 85ef9630
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,9 @@ protected:
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Triggers the Computation of the sample list */
void GenerateData(void);
virtual void GenerateData(void);
virtual void GenerateInputRequestedRegion(void);
/** Compute the calss statistics*/
void GenerateClassStatistics();
......
......@@ -188,6 +188,27 @@ ListSampleGenerator<TImage, TVectorData>
return dynamic_cast<ListLabelType*>(this->itk::ProcessObject::GetOutput(3));
}
template <class TImage, class TVectorData>
void
ListSampleGenerator<TImage, TVectorData>
::GenerateInputRequestedRegion()
{
ImagePointerType img = static_cast<ImageType *>(this->ProcessObject::GetInput(0));
if(img.IsNotNull())
{
// Requested regions will be generated during GenerateData
// call. For now request an empty region so as to avoid requesting
// the largest possible region (fixes bug #943 )
typename ImageType::RegionType dummyRegion;
typename ImageType::SizeType dummySize;
dummySize.Fill(0);
dummyRegion.SetSize(dummySize);
img->SetRequestedRegion(dummyRegion);
}
}
template <class TImage, class TVectorData>
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment