Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy / paste error in MrDatasetStrategy ? #2563

Open
julien-louis opened this issue Jan 6, 2025 · 0 comments
Open

copy / paste error in MrDatasetStrategy ? #2563

julien-louis opened this issue Jan 6, 2025 · 0 comments

Comments

@julien-louis
Copy link
Collaborator

in MrDatasetStrategy, shouldn't isBefore be used instead of isAfter when setting firstImageAcquisitionTime :

                for (Dataset dataset : serie.getDatasets()) {
			importJob.getProperties().put(ImportJob.INDEX_PROPERTY, String.valueOf(datasetIndex));

			MrDataset mrDataset = new MrDataset();
			mrDataset = generateSingleDataset(serieAttributes.getDatasetAttributes(dataset.getFirstImageSOPInstanceUID()), serie, dataset, datasetIndex, importJob);
			if (mrDataset.getFirstImageAcquisitionTime() != null) {
				if (datasetWrapper.getFirstImageAcquisitionTime() == null) {
					datasetWrapper.setFirstImageAcquisitionTime(mrDataset.getFirstImageAcquisitionTime());
				} else {
					if (datasetWrapper.getFirstImageAcquisitionTime().isAfter(mrDataset.getFirstImageAcquisitionTime())) {
						datasetWrapper.setFirstImageAcquisitionTime(mrDataset.getFirstImageAcquisitionTime());
					}
				}
			}
			if (mrDataset.getLastImageAcquisitionTime() != null) {
				if (datasetWrapper.getLastImageAcquisitionTime() == null) {
					datasetWrapper.setLastImageAcquisitionTime(mrDataset.getLastImageAcquisitionTime());
				} else {
					if (datasetWrapper.getLastImageAcquisitionTime().isAfter(mrDataset.getLastImageAcquisitionTime())) {
						datasetWrapper.setLastImageAcquisitionTime(mrDataset.getLastImageAcquisitionTime());
					}
				}
			}
			datasetWrapper.getDatasets().add(mrDataset);
			datasetIndex++;
		}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant