Skip to content
Snippets Groups Projects
Commit 9fa5cb46 authored by Grégoire Mercier's avatar Grégoire Mercier
Browse files

BUG: Wavelet

parent 5697d19e
No related branches found
No related tags found
No related merge requests found
......@@ -194,6 +194,8 @@ private:
Those method will disappear.
Use Default because don't need to know the sensor type*/
typename DefaultImageMetadataInterface::Pointer m_ImageMetadataInterface;
typename itk::MutexLock::Pointer m_MyMutex;
};
......
......@@ -31,6 +31,7 @@ template <class TPixel, unsigned int VImageDimension>
Image<TPixel,VImageDimension>::Image()
{
m_ImageMetadataInterface = DefaultImageMetadataInterface::New();
m_MyMutex = itk::MutexLock::New();
}
template <class TPixel, unsigned int VImageDimension>
......@@ -153,10 +154,12 @@ void
Image<TPixel, VImageDimension>
::CopyInformation(const itk::DataObject * data)
{
m_MyMutex->Lock();
Superclass::CopyInformation(data);
// this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary());
itk::MetaDataDictionary dict = data->GetMetaDataDictionary();
this->itk::Object::SetMetaDataDictionary(dict);
m_MyMutex->Unlock();
}
template <class TPixel, unsigned int VImageDimension>
......
......@@ -185,6 +185,7 @@ private:
Those method will disappear.
Use Default because don't need to know the sensor type*/
typename DefaultImageMetadataInterface::Pointer m_ImageMetadataInterface;
typename itk::MutexLock::Pointer m_MyMutex;
};
......
......@@ -32,6 +32,7 @@ template <class TPixel, unsigned int VImageDimension>
VectorImage<TPixel,VImageDimension>::VectorImage()
{
m_ImageMetadataInterface = DefaultImageMetadataInterface::New();
m_MyMutex = itk::MutexLock::New();
}
template <class TPixel, unsigned int VImageDimension>
......@@ -154,8 +155,10 @@ void
VectorImage<TPixel, VImageDimension>
::CopyInformation(const itk::DataObject * data)
{
m_MyMutex->Lock();
Superclass::CopyInformation(data);
this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary());
m_MyMutex->Unlock();
}
template <class TPixel, unsigned int VImageDimension>
......
......@@ -812,17 +812,18 @@ WaveletFilterBank< TInputImage, TOutputImage, TWaveletOperator, INVERSE >
lowPassOperator.CreateDirectional();
long int radius [ InputImageDimension ];
radius[0] = lowPassOperator.GetRadius()[0];
//radius[0] = lowPassOperator.GetRadius()[0];
HighPassOperatorType highPassOperator;
highPassOperator.SetDirection(0);
highPassOperator.SetUpSampleFactor( this->GetUpSampleFilterFactor() );
highPassOperator.CreateDirectional();
for ( unsigned int i = 1; i < InputImageDimension; i++ )
for ( unsigned int i = 0; i < InputImageDimension; i++ )
{
if ( radius[i] < highPassOperator.GetRadius()[i] )
radius[i] = highPassOperator.GetRadius()[i];
radius[i] = lowPassOperator.GetRadius()[0];
if ( radius[i] < highPassOperator.GetRadius()[0] )
radius[i] = highPassOperator.GetRadius()[0];
}
InputImageRegionType paddedRegion = destRegion;
......
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