1 /*=========================================================================
4 Module: $RCSfile: vtkGdcmReader.cxx,v $
6 Date: $Date: 2006/03/29 11:23:43 $
7 Version: $Revision: 1.86 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 //-----------------------------------------------------------------------------
20 // //////////////////////////////////////////////////////////////
22 //===> Many users expect from vtkGdcmReader it 'orders' the images
23 // (that's the job of gdcm::SerieHelper ...)
24 // When user *knows* the files with same Serie UID
25 // have same sizes, same 'pixel' type, same color convention, ...
26 // the right way to proceed is as follow :
28 // gdcm::SerieHelper *sh= new gdcm::SerieHelper();
29 // // if user wants *not* to load some parts of the file headers
30 // sh->SetLoadMode(loadMode);
31 // // if user wants *not* to load some files
32 // sh->AddRestriction(group, element, value, operator);
33 // sh->AddRestriction( ...
34 // sh->SetDirectory(directoryWithImages);
36 // // if user wants to sort reverse order
37 // sh->SetSortOrderToReverse();
38 // // here, we suppose only the first Coherent File List is of interest
39 // gdcm::FileList *l = sh->GetFirstCoherentFileList();
40 // // if user is doesn't trust too much the files with same Serie UID
41 // if ( !sh->IsCoherent(l) )
42 // return; // not same sizes, same 'pixel' type -> stop
43 // sh->OrderFileList(l); // sort the list
45 // vtkGdcmReader *reader = vtkGdcmReader::New();
46 // // if user wants to modify pixel order (Mirror, TopDown, 90°Rotate, ...)
47 // // he has to supply the function that does the job
48 // // (a *very* simple example is given in vtkgdcmSerieViewer.cxx)
49 // reader->SetUserFunction (userSuppliedFunction);
50 // // to pass a 'Coherent File List' as produced by gdcm::SerieHelper
51 // reader->SetCoherentFileList(l);
54 // WARNING TODO CLEANME
55 // Actual limitations of this code
56 // when a Coherent File List from SerieHelper is not used (bad idea :-(
58 // //////////////////////////////////////////////////////////////
60 #include "gdcmFileHelper.h"
63 #include "vtkGdcmReader.h"
64 #include "gdcmDebug.h"
65 #include "gdcmCommon.h"
67 #include <vtkObjectFactory.h>
68 #include <vtkImageData.h>
69 #include <vtkPointData.h>
70 #include <vtkLookupTable.h>
72 vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.86 $")
73 vtkStandardNewMacro(vtkGdcmReader)
75 //-----------------------------------------------------------------------------
76 // Constructor / Destructor
77 vtkGdcmReader::vtkGdcmReader()
79 this->LookupTable = NULL;
80 this->AllowLookupTable = false;
81 this->AllowLightChecking = false;
82 this->LoadMode = gdcm::LD_ALL; // Load everything (possible values :
86 this->CoherentFileList = 0;
87 this->UserFunction = 0;
90 // this->Execution=false; // For VTK5.0
93 vtkGdcmReader::~vtkGdcmReader()
95 this->RemoveAllFileName();
96 this->InternalFileNameList.clear();
98 this->LookupTable->Delete();
101 //-----------------------------------------------------------------------------
103 void vtkGdcmReader::PrintSelf(ostream &os, vtkIndent indent)
105 this->Superclass::PrintSelf(os,indent);
106 os << indent << "Filenames : " << endl;
107 vtkIndent nextIndent = indent.GetNextIndent();
108 for (std::list<std::string>::iterator it = FileNameList.begin();
109 it != FileNameList.end();
112 os << nextIndent << it->c_str() << endl ;
116 //-----------------------------------------------------------------------------
119 * Remove all files from the list of images to read.
121 void vtkGdcmReader::RemoveAllFileName(void)
123 this->FileNameList.clear();
128 * Adds a file name to the list of images to read.
130 void vtkGdcmReader::AddFileName(const char* name)
132 // We need to bypass the const pointer [since list<>.push_bash() only
133 // takes a char* (but not a const char*)] by making a local copy:
134 this->FileNameList.push_back(name);
139 * Sets up a filename to be read.
141 void vtkGdcmReader::SetFileName(const char *name)
143 vtkImageReader2::SetFileName(name);
144 // Since we maintain a list of filenames, when building a volume,
145 // (see vtkGdcmReader::AddFileName), we additionaly need to purge
146 // this list when we manually positionate the filename.
147 vtkDebugMacro(<< "Clearing all files given with AddFileName");
148 this->FileNameList.clear();
152 //-----------------------------------------------------------------------------
155 * Configure the output e.g. WholeExtent, spacing, origin, scalar type...
157 void vtkGdcmReader::ExecuteInformation()
159 // if(this->Execution) // For VTK5.0
162 // this->Execution=true; // end For VTK5.0
163 this->RemoveAllInternalFile();
164 if(this->MTime>this->fileTime)
166 this->TotalNumberOfPlanes = 0;
168 if ( this->CoherentFileList != 0 )
170 this->UpdateFileInformation();
174 this->BuildFileListFromPattern();
175 this->LoadFileInformation();
178 if ( this->TotalNumberOfPlanes == 0)
180 vtkErrorMacro(<< "File set is not coherent. Exiting...");
184 // if the user has not set the extent, but has set the VOI
185 // set the z axis extent to the VOI z axis
186 if (this->DataExtent[4]==0 && this->DataExtent[5] == 0 &&
187 (this->DataVOI[4] || this->DataVOI[5]))
189 this->DataExtent[4] = this->DataVOI[4];
190 this->DataExtent[5] = this->DataVOI[5];
193 // When the user has set the VOI, check it's coherence with the file content.
194 if (this->DataVOI[0] || this->DataVOI[1] ||
195 this->DataVOI[2] || this->DataVOI[3] ||
196 this->DataVOI[4] || this->DataVOI[5])
198 if ((this->DataVOI[0] < 0) ||
199 (this->DataVOI[1] >= this->NumColumns) ||
200 (this->DataVOI[2] < 0) ||
201 (this->DataVOI[3] >= this->NumLines) ||
202 (this->DataVOI[4] < 0) ||
203 (this->DataVOI[5] >= this->TotalNumberOfPlanes ))
205 vtkWarningMacro(<< "The requested VOI is larger than expected extent.");
206 this->DataVOI[0] = 0;
207 this->DataVOI[1] = this->NumColumns - 1;
208 this->DataVOI[2] = 0;
209 this->DataVOI[3] = this->NumLines - 1;
210 this->DataVOI[4] = 0;
211 this->DataVOI[5] = this->TotalNumberOfPlanes - 1;
216 this->DataExtent[0] = 0;
217 this->DataExtent[1] = this->NumColumns - 1;
218 this->DataExtent[2] = 0;
219 this->DataExtent[3] = this->NumLines - 1;
220 this->DataExtent[4] = 0;
221 this->DataExtent[5] = this->TotalNumberOfPlanes - 1;
223 // We don't need to set the Endian related stuff (by using
224 // this->SetDataByteOrderToBigEndian() or SetDataByteOrderToLittleEndian()
225 // since the reading of the file is done by gdcm.
226 // But we do need to set up the data type for downstream filters:
227 if ( ImageType == "8U" )
229 vtkDebugMacro(<< "8 bits unsigned image");
230 this->SetDataScalarTypeToUnsignedChar();
232 else if ( ImageType == "8S" )
234 vtkErrorMacro(<< "Cannot handle 8 bit signed files");
237 else if ( ImageType == "16U" )
239 vtkDebugMacro(<< "16 bits unsigned image");
240 this->SetDataScalarTypeToUnsignedShort();
242 else if ( ImageType == "16S" )
244 vtkDebugMacro(<< "16 bits signed image");
245 this->SetDataScalarTypeToShort();
247 else if ( ImageType == "32U" )
249 vtkDebugMacro(<< "32 bits unsigned image");
250 vtkDebugMacro(<< "WARNING: forced to signed int !");
251 this->SetDataScalarTypeToInt();
253 else if ( ImageType == "32S" )
255 vtkDebugMacro(<< "32 bits signed image");
256 this->SetDataScalarTypeToInt();
258 else if ( ImageType == "FD" )
260 vtkDebugMacro(<< "64 bits Double image");
261 this->SetDataScalarTypeToDouble();
263 //Set number of scalar components:
264 this->SetNumberOfScalarComponents(this->NumComponents);
266 this->fileTime=this->MTime;
269 this->Superclass::ExecuteInformation();
271 //this->GetOutput()->SetUpdateExtentToWholeExtent();// For VTK5.0
272 //this->BuildData(this->GetOutput());
274 //this->Execution=false;
275 //this->RemoveAllInternalFile(); // End For VTK5.0
279 * Update => ouput->Update => UpdateData => Execute => ExecuteData
280 * (see vtkSource.cxx for last step).
281 * This function (redefinition of vtkImageReader::ExecuteData, see
282 * VTK/IO/vtkImageReader.cxx) reads a data from a file. The data
283 * extent/axes are assumed to be the same as the file extent/order.
285 void vtkGdcmReader::ExecuteData(vtkDataObject *output)
287 vtkImageData *data=vtkImageData::SafeDownCast(output);
288 data->SetExtent(this->DataExtent);
290 /* if ( CoherentFileList != 0 ) // When a list of names is passed
292 if (this->CoherentFileList->empty())
294 vtkErrorMacro(<< "Coherent File List must have at least a valid File*.");
298 else if (this->InternalFileNameList.empty())
300 vtkErrorMacro(<< "A least a valid FileName must be specified.");
305 // data->AllocateScalars(); // For VTK5.0
306 // if (this->UpdateExtentIsEmpty(output))
310 //} // end For VTK5.0
312 data->AllocateScalars(); // For VTK5.0
313 if (this->UpdateExtentIsEmpty(output))
318 //void vtkGdcmReader::BuildData(vtkDataObject *output) // For VTK5.0
320 // vtkImageData *data = this->AllocateOutputData(output); // end For VTK5.0
322 data->GetPointData()->GetScalars()->SetName("DicomImage-Volume");
324 // Test if output has valid extent
325 // Prevent memory errors
326 if((this->DataExtent[1]-this->DataExtent[0]>=0) &&
327 (this->DataExtent[3]-this->DataExtent[2]>=0) &&
328 (this->DataExtent[5]-this->DataExtent[4]>=0))
330 // The memory size for a full stack of images of course depends
331 // on the number of planes and the size of each image:
332 //size_t StackNumPixels = this->NumColumns * this->NumLines
333 // * this->TotalNumberOfPlanes * this->NumComponents;
334 //size_t stack_size = StackNumPixels * this->PixelSize; //not used
335 // Allocate pixel data space itself.
337 // Variables for the UpdateProgress. We shall use 50 steps to signify
338 // the advance of the process:
339 unsigned long UpdateProgressTarget = (unsigned long) ceil (this->NumLines
340 * this->TotalNumberOfPlanes
342 // The actual advance measure:
343 unsigned long UpdateProgressCount = 0;
345 // Filling the allocated memory space with each image/volume:
347 size_t size = this->NumColumns * this->NumLines * this->NumPlanes
348 * data->GetScalarSize() * this->NumComponents;
349 unsigned char *Dest = (unsigned char *)data->GetScalarPointer();
350 for (std::vector<gdcm::File* >::iterator it = InternalFileList.begin();
351 it != InternalFileList.end();
354 this->LoadImageInMemory(*it, Dest,
355 UpdateProgressTarget,
356 UpdateProgressCount);
360 this->RemoveAllInternalFile(); // For VTK5.0
364 * vtkGdcmReader can have the file names specified through two ways:
365 * (1) by calling the vtkImageReader2::SetFileName(), SetFilePrefix() and
367 * (2) By successive calls to vtkGdcmReader::AddFileName()
368 * When the first method was used by caller we need to update the local
371 void vtkGdcmReader::BuildFileListFromPattern()
373 this->RemoveAllInternalFileName();
375 // Test miscellanous cases
376 if ((! this->FileNameList.empty()) && this->FileName )
378 vtkErrorMacro(<< "Both AddFileName and SetFileName schemes were used");
379 vtkErrorMacro(<< "No images loaded ! ");
383 if ((! this->FileNameList.empty()) && this->FilePrefix )
385 vtkErrorMacro(<< "Both AddFileName and SetFilePrefix schemes were used");
386 vtkErrorMacro(<< "No images loaded ! ");
390 if (this->FileName && this->FilePrefix)
392 vtkErrorMacro(<< "Both SetFileName and SetFilePrefix schemes were used");
393 vtkErrorMacro(<< "No images loaded ! ");
397 // Create the InternalFileNameList
398 if (! this->FileNameList.empty() )
400 vtkDebugMacro(<< "Using the AddFileName specified files");
401 this->InternalFileNameList=this->FileNameList;
405 if (!this->FileName && !this->FilePrefix)
407 vtkErrorMacro(<< "FileNames are not set. Either use AddFileName() or");
408 vtkErrorMacro(<< "specify a FileName or FilePrefix.");
414 // Single file loading (as given with ::SetFileName()):
415 // Case of multi-frame file considered here
416 this->ComputeInternalFileName(this->DataExtent[4]);
417 vtkDebugMacro(<< "Adding file " << this->InternalFileName);
418 this->AddInternalFileName(this->InternalFileName);
422 // Multi file loading (as given with ::SetFilePattern()):
423 for (int idx = this->DataExtent[4]; idx <= this->DataExtent[5]; ++idx)
425 this->ComputeInternalFileName(idx);
426 vtkDebugMacro(<< "Adding file " << this->InternalFileName);
427 this->AddInternalFileName(this->InternalFileName);
433 * Load all the files and set it in the InternalFileList
434 * For each file, the readability and the coherence of image caracteristics
435 * are tested. If an image doesn't agree the required specifications, it
436 * isn't considered and no data will be set for the planes corresponding
439 * The source of this work is the list of file name generated by the
440 * BuildFileListFromPattern method
442 void vtkGdcmReader::LoadFileInformation()
445 bool foundReference=false;
449 for (std::list<std::string>::iterator filename = InternalFileNameList.begin();
450 filename != InternalFileNameList.end();
453 // check for file readability
455 fp = fopen(filename->c_str(),"rb");
458 vtkErrorMacro(<< "Unable to open file " << filename->c_str());
459 vtkErrorMacro(<< "Removing this file from read files: "
460 << filename->c_str());
462 InternalFileList.push_back(file);
468 file=gdcm::File::New();
469 file->SetLoadMode( LoadMode );
470 file->SetFileName(filename->c_str() );
473 // Test the Dicom file readability
474 if(!file->IsReadable())
476 vtkErrorMacro(<< "Gdcm cannot parse file " << filename->c_str());
477 vtkErrorMacro(<< "Removing this file from read files: "
478 << filename->c_str());
481 InternalFileList.push_back(file);
485 // Test the Pixel Type recognition
486 type = file->GetPixelType();
487 if ( (type != "8U") && (type != "8S")
488 && (type != "16U") && (type != "16S")
489 && (type != "32U") && (type != "32S") )
491 vtkErrorMacro(<< "Bad File Type for file " << filename->c_str() << "\n"
492 << " File type found : " << type.c_str()
493 << " (might be 8U, 8S, 16U, 16S, 32U, 32S) \n"
494 << " Removing this file from read files");
497 InternalFileList.push_back(file);
501 // Test the image informations
504 foundReference = true;
505 GetFileInformation(file);
507 vtkDebugMacro(<< "This file taken as coherence reference:"
508 << filename->c_str());
509 vtkDebugMacro(<< "Image dimensions of reference file as read from Gdcm:"
510 << this->NumColumns << " " << this->NumLines << " "
513 else if(!TestFileInformation(file))
519 InternalFileList.push_back(file);
524 * Update the file informations.
525 * This works exactly like LoadFileInformation, but the source of work
526 * is the list of coherent files
528 void vtkGdcmReader::UpdateFileInformation()
530 this->InternalFileList=*(this->CoherentFileList);
533 for(gdcmFileList::iterator it=InternalFileList.begin();
534 it!=InternalFileList.end();
539 GetFileInformation(*it);
546 * Get the informations from a file.
547 * These informations are required to specify the output image
550 void vtkGdcmReader::GetFileInformation(gdcm::File *file)
552 // Get the image caracteristics
553 this->NumColumns = file->GetXSize();
554 this->NumLines = file->GetYSize();
555 this->NumPlanes = file->GetZSize();
557 if (CoherentFileList == 0)
558 this->TotalNumberOfPlanes = this->NumPlanes*InternalFileNameList.size();
560 this->TotalNumberOfPlanes = this->NumPlanes*CoherentFileList->size();
562 this->ImageType = file->GetPixelType();
563 this->PixelSize = file->GetPixelSize();
565 this->DataSpacing[0] = file->GetXSpacing();
566 this->DataSpacing[1] = file->GetYSpacing();
567 this->DataSpacing[2] = file->GetZSpacing();
569 // Get the image data caracteristics
570 if( file->HasLUT() && this->AllowLookupTable )
572 // I could raise an error is AllowLookupTable is on and HasLUT() off
573 this->NumComponents = file->GetNumberOfScalarComponentsRaw();
577 this->NumComponents = file->GetNumberOfScalarComponents(); //rgb or mono
582 * When more than one filename is specified (i.e. we expect loading
583 * a stack or volume) we need to check that the corresponding images/volumes
584 * to be loaded are coherent i.e. to make sure:
585 * - they all share the same X dimensions
586 * - they all share the same Y dimensions
587 * - they all share the same ImageType ( 8 bit signed, or unsigned...)
589 * Eventually, we emit a warning when all the files do NOT share the
590 * Z dimension, since we can still build a stack but the
591 * files are not coherent in Z, which is probably a source a trouble...
592 * When files are not readable (either the file cannot be opened or
593 * because gdcm cannot parse it), they are flagged as "GDCM_UNREADABLE".
594 * This method returns the total number of planar images to be loaded
595 * (i.e. an image represents one plane, but a volume represents many planes)
598 * Test the coherent informations of the file with the reference informations
599 * used as image caracteristics. The tested informations are :
600 * - they all share the same X dimensions
601 * - they all share the same Y dimensions
602 * - they all share the same Z dimensions
603 * - they all share the same number of components
604 * - they all share the same ImageType ( 8 bit signed, or unsigned...)
606 * \return True if the file match, False otherwise
608 bool vtkGdcmReader::TestFileInformation(gdcm::File *file)
610 int numColumns = file->GetXSize();
611 int numLines = file->GetYSize();
612 int numPlanes = file->GetZSize();
614 unsigned int pixelSize = file->GetPixelSize();
616 if( file->HasLUT() && this->AllowLookupTable )
617 numComponents = file->GetNumberOfScalarComponentsRaw();
619 numComponents = file->GetNumberOfScalarComponents(); //rgb or mono
621 if( numColumns != this->NumColumns )
623 vtkErrorMacro(<< "File X value doesn't match with the previous ones: "
624 << file->GetFileName().c_str()
625 << ". Found " << numColumns << ", must be "
626 << this->NumColumns);
629 if( numLines != this->NumLines )
631 vtkErrorMacro(<< "File Y value doesn't match with the previous ones: "
632 << file->GetFileName().c_str()
633 << ". Found " << numLines << ", must be "
637 if( numPlanes != this->NumPlanes )
639 vtkErrorMacro(<< "File Z value doesn't match with the previous ones: "
640 << file->GetFileName().c_str()
641 << ". Found " << numPlanes << ", must be "
645 if( numComponents != this->NumComponents )
647 vtkErrorMacro(<< "File Components count doesn't match with the previous ones: "
648 << file->GetFileName().c_str()
649 << ". Found " << numComponents << ", must be "
650 << this->NumComponents);
653 if( pixelSize != this->PixelSize )
655 vtkErrorMacro(<< "File pixel size doesn't match with the previous ones: "
656 << file->GetFileName().c_str()
657 << ". Found " << pixelSize << ", must be "
665 //-----------------------------------------------------------------------------
668 * Remove all file names to the internal list of images to read.
670 void vtkGdcmReader::RemoveAllInternalFileName(void)
672 this->InternalFileNameList.clear();
676 * Adds a file name to the internal list of images to read.
678 void vtkGdcmReader::AddInternalFileName(const char *name)
680 char *LocalName = new char[strlen(name) + 1];
681 strcpy(LocalName, name);
682 this->InternalFileNameList.push_back(LocalName);
687 * Remove all file names to the internal list of images to read.
689 void vtkGdcmReader::RemoveAllInternalFile(void)
693 for(gdcmFileList::iterator it=InternalFileList.begin();
694 it!=InternalFileList.end();
700 this->InternalFileList.clear();
703 void vtkGdcmReader::IncrementProgress(const unsigned long updateProgressTarget,
704 unsigned long &updateProgressCount)
706 // Update progress related for bad files:
707 updateProgressCount += this->NumLines;
708 if (updateProgressTarget > 0)
710 if (!(updateProgressCount%updateProgressTarget))
712 this->UpdateProgress(
713 updateProgressCount/(50.0*updateProgressTarget));
719 * Loads the contents of the image/volume contained by char *fileName at
720 * the dest memory address. Returns the size of the data loaded.
722 /*void vtkGdcmReader::LoadImageInMemory(
723 std::string fileName,
725 const unsigned long updateProgressTarget,
726 unsigned long &updateProgressCount)
728 vtkDebugMacro(<< "Copying to memory image [" << fileName.c_str() << "]");
731 f = new gdcm::File();
732 f->SetLoadMode( LoadMode );
733 f->SetFileName( fileName.c_str() );
736 LoadImageInMemory(f,dest,
737 updateProgressTarget,
738 updateProgressCount);
743 * Loads the contents of the image/volume contained by gdcm::File* f at
744 * the Dest memory address. Returns the size of the data loaded.
745 * \ param f File to consider. NULL if the file must be skiped
746 * \remarks Assume that if (f != NULL) then its caracteristics match
747 * with the previous ones
749 void vtkGdcmReader::LoadImageInMemory(
752 const unsigned long updateProgressTarget,
753 unsigned long &updateProgressCount)
758 gdcm::FileHelper *fileH = gdcm::FileHelper::New( f );
759 fileH->SetUserFunction( UserFunction );
761 int numColumns = f->GetXSize();
762 int numLines = f->GetYSize();
763 int numPlanes = f->GetZSize();
766 if( f->HasLUT() && this->AllowLookupTable )
767 numComponents = f->GetNumberOfScalarComponentsRaw();
769 numComponents = f->GetNumberOfScalarComponents(); //rgb or mono
770 vtkDebugMacro(<< "numComponents:" << numComponents);
771 vtkDebugMacro(<< "Copying to memory image [" << f->GetFileName().c_str() << "]");
774 // If the data structure of vtk for image/volume representation
775 // were straigthforwards the following would be enough:
776 // GdcmFile.GetImageDataIntoVector((void*)Dest, size);
777 // But vtk chooses to invert the lines of an image, that is the last
778 // line comes first (for some axis related reasons?). Hence we need
779 // to load the image line by line, starting from the end.
781 int lineSize = NumComponents * numColumns * f->GetPixelSize();
782 int planeSize = lineSize * numLines;
786 if( fileH->GetFile()->HasLUT() && AllowLookupTable )
788 // to avoid bcc 5.5 w
789 /*size = */ fileH->GetImageDataSize();
790 src = (unsigned char*) fileH->GetImageDataRaw();
791 unsigned char *lut = (unsigned char*) fileH->GetLutRGBA();
793 if(!this->LookupTable)
795 this->LookupTable = vtkLookupTable::New();
798 this->LookupTable->SetNumberOfTableValues(256);
799 for (int tmp=0; tmp<256; tmp++)
801 this->LookupTable->SetTableValue(tmp,
802 (float)lut[4*tmp+0]/255.0,
803 (float)lut[4*tmp+1]/255.0,
804 (float)lut[4*tmp+2]/255.0,
807 this->LookupTable->SetRange(0,255);
808 vtkDataSetAttributes *a = this->GetOutput()->GetPointData();
809 a->GetScalars()->SetLookupTable(this->LookupTable);
814 //size = fileH->GetImageDataSize();
815 // useless - just an accessor; 'size' unused
816 src = (unsigned char*)fileH->GetImageData();
819 unsigned char *dst = dest + planeSize - lineSize;
820 for (int plane = 0; plane < numPlanes; plane++)
822 for (int line = 0; line < numLines; line++)
824 // Copy one line at proper destination:
825 memcpy((void*)dst, (void*)src, lineSize);
828 // Update progress related:
829 if (!(updateProgressCount%updateProgressTarget))
831 this->UpdateProgress(
832 updateProgressCount/(50.0*updateProgressTarget));
834 updateProgressCount++;
836 dst += 2 * planeSize;
842 //-----------------------------------------------------------------------------