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

TransformixFilter should _not_ automatically do this->SetOutputDirectory(".") #923

Open
N-Dekker opened this issue Jun 23, 2023 · 0 comments
Assignees

Comments

@N-Dekker
Copy link
Member

N-Dekker commented Jun 23, 2023

Users may leave the output directory path empty, which is usually an indication that no output is written, However when ComputeSpatialJacobian, ComputeDeterminantOfSpatialJacobian, ComputeDeformationField, or FixedPointSetFileName are set, TransformixFilter will still try to write to the current directory.

TransformixFilter::GenerateData() does:

if ((m_ComputeSpatialJacobian || m_ComputeDeterminantOfSpatialJacobian || m_ComputeDeformationField ||
!m_FixedPointSetFileName.empty() || m_LogToFile) &&
m_OutputDirectory.empty())
{
this->SetOutputDirectory(".");
}

It may be a deliberate choice to not write to an output directory. So TransformixFilter should not do this->SetOutputDirectory("."). Instead I think it would be better if it would just produce a warning message, like:

Output directory not specified. Unable to write SpatialJacobian, DeterminantOfSpatialJacobian, DeformationField, or FixedPointSet to file.

What do you think?

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

3 participants